When switching networks, it can take anywhere from a few seconds to a few minutes to get assigned a new address. This means you’re checking every few seconds to see if you’re connected yet.
Safari, however, is notified when a new connection is made–and will attempt to reload any pages that failed to load.
This means after you’ve connected to a new network, load a website into Safari (which will fail) and wait until Safari reloads the page. You are now connected to your new network.
[Via Martin]

Simon Roe