If Safari is getting very slow:
(Presumably you regularly empty your Safari cache by deleting the following file:
Home/Library/Caches/com.apple.Safari/cache.db
and clear your History)
Adding Open DNS codes to your Network Preferences, should give good results in terms of speed-up as well as added security, (including anti-phishing and redirects) (Full information about Open DNS is here: http://www.opendns.com/home/nobloat ) and further independent information can be read here:
http://reviews.cnet.com/8301-13727_7-57338784-263/free-dnscrypt-tool-enhances-ma c-web-security/?tag=mncol;txt
and here:
http://www.macworld.com/article/1146064/troubleshootdns.html?t=234
If you are using a single computer: Open System Preferences/Network. Double click on your connection type, or select it in the drop-down menu, and in the box marked 'DNS Servers' add the following two numbers:
208.67.222.222
208.67.220.220
(You can also enter them if you click on Advanced and then DNS)
Sometimes reversing the order of the DNS numbers can be beneficial in cases where there is a long delay before web pages start to load, and then suddenly load at normal speed:
http://support.apple.com/kb/TS2296
If your computer is part of a network:please refer to this page: http://www.opendns.com/start/best_practices/#your_network and follow the advice given.
If you use a Router, make sure it has the latest firmware installed.
One reason for a slowness in page loading may be the 'DNS Pre-fetching' feature of Safari 5.x as is described here:
http://support.apple.com/kb/TS3408?viewlocale=en_US
You can cancel DNS pre-fetching by going to Terminal and typing:
defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false
You have to restart Safari for it to take effect.
If Safari seems to hang for ages:
If you have a lot of tabs open and/or a lot of pages running Flash, Safari can sometimes 'hang', requiring a restart of Safari. This can often be inconvenient, and as it is rarely Safari itself that is hanging but merely one of its plug-ins, usually Flash, there is a way using Terminal to restart the plug-ins (without restarting Safari and losing your tabs) by quitting the WebPluginHost process:
Open the Terminal from the Utilities folder in /Applications and type
killall -9 WebKitPluginHost
Note that this command kills all Safari plug-ins, not just Flash. All plug-ins should start back up when you reload the page.
Then go back to Safari and refresh any pages that were using the Flash plug-in. This also fixes the Beachball of Death. Try this whenever Safari gets slow or freezes. The latest versions of Flash 10.1 onwards appear to have improved the situation somewhat, but haven't completed eliminated it.
For this and other reasons Apple switched their websites to HTML5 in January 2011:
http://www.appleinsider.com/articles/11/01/26/apple_revamps_its_public_website_u sing_html5.html