Why is Safari So Slow

I’ve had this phenomenon for years now. Safari works great on a clean install. It’s fast and elegant, but then after a few days it just takes so long, even on the fastest connection, to load one page. Sometimes it won’t even load the page. I’ve tried all the normal fixes like clear the cache, clear browser history/cookies, and reset safari. I’ve even switch browsers, but I always go back to Safari for it’s slim look and small impact on battery and performance. Yesterday, I figured it out.

Apple, a while back, put this thing into Safari to make pages load faster. It is called DNS Prefetching. To summarize, it is used the same way DNS servers are. It translates Domain names to their specific IPs, but it does this for all the IP addresses and all resources on the webpage before it loads. It “prefetches” them so that when you click on a link or a picture Safari can route you to the right address quicker. This also can have the reverse effect and have you waiting too long for it to load the page. So to disable this makes Safari load so much faster.

To disable open Terminal and type the command below and press enter:

defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

To Enable it again type this into Terminal and press enter:

defaults delete com.apple.safari WebKitDNSPrefetchingEnabled

I have now switched back to Safari for good.