If Safari is getting very slow:
(Presumably you regularly empty your Safari cache by deleting the following file:
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:
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:
(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:
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:
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 later 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:
For Snow Leopard/Lion users this should also be read: