How I sped up web browsing in OS X

I have long been frustrated by how long the “Looking up” or “Contacting” phase of web browsing on OS X takes. I thought I had solutions in the past, but nothing really worked. While I am connected to a wired network I don’t experience the issue, it is only when I am wireless.

The symptom goes something like this: type in www.apple.com (or any site) in the address bar of the browser and wait many seconds while the browser goes from the looking up www.apple.com to connecting to www.apple.com. Once it starts connecting the performance is fine. Sound familiar? I tried Safari, FireFox, Opera, Camino, and Webkit and all had the same results.

I originally assumed that this was an issue with name resolution, the time it takes to turn that friendly name, www.apple.com, to an IP address that the computer cares about, so I tried forcing manual DNS entries. That helped a little. When I would drop out to the shell and do nslookup or dig commands the results would return quickly, which then confused the entire thing; if name resolution was fast at the shell, why was it taking so long at the browser.

So I started messing with the network settings and think I finally hit on a really simple solution. I changed my network Location from Automatic to a new one I created called Wireless. I went to System Preferences, Network, clicked on the Location drop-down, selected New, gave it a name (I chose Wireless for mine), then filled out the Airport, TCP/IP, PPPoe, AppleTalk and Proxies sections as they should be. For me the defaults were really all that was needed, but I did go back to the TCP/IP section and and the DNS servers in manaually. Comcast’s DNS servers have never been very fast so I used a pair from Verizon (4.2.2.1, 4.2.2.2) and click Apply.

Now the Lookup phase happens within a second or two for me and I’m happy with the result. Web browsing finally feels on par with the Windows world I used to live in (and still live in at work). Something so simple gave me a nice little speed bump on my 15″ PowerBook G4. Maybe it will work for others struggling with this same issue.