Basically, there is no guaranteed way to do this - you just cannot rely upon the network:
viewtopic.php?f=34&t=748&p=2667&hilit=wloc#p2667