Speed up Safari

From Mac Guides

Jump to: navigation, search

This guide explains several methods to speed up web browsing on Apple's own web browser, Safari. None of these tips will help if you are experiencing problems with your hardware/system software or if your ISP is having technical problems of its own. It is worth remembering that due to the structure of the internet there will often be problems completely out of your control, such as malfunctioning/overloaded servers or data links.

It is suggested that you use a method of trial and error to fix specific speed problems - apply one method and then test for its impact. For a more general improvement you can combine tips.


Empty the Cache

Emptying Safari's Cache
Emptying Safari's Cache

Safari uses caching to save recently viewed websites on your Hard Drive. This technique is common place with all web browsers but can cause problems if your cache gets too big or corrupted as your computer will spend excess time searching the cache when it could fetch the data from the internet in less time.

  • To empty the cache memory go to the Safari menu and click 'Empty Cache...'. You will be presented with a window explaining what will happen. Click OK to proceed.

Note: In many cases emptying the cache may temporarily slow down Safari, especially if you are on a slow connection.

Reset Safari

Apple provide a quick way to empty the cache, clear cookies, erase history and reset autofill information. This can often provide a quick fix for improving performance. The disadvantage is that you will need to re-enter log in information on sites that had previously stored data in cookies.

  • To Reset Safari go to the Safari menu and click 'Reset Safari...'. You will be presented with a window explaining what will happen. Click OK to proceed.

Erase Website Favicons

Safari's Icon Cache
Safari's Icon Cache

Most web pages now include a small icon or 'favicon' which is visible in the address bar and next to bookmarks. With the vast amount of websites available over the internet, it is obvious that these icons can potentially take up a fair amount hard disk space. This will cause slow downs due to Safari having to 'sift' through the collection to find the right image. It is possible to erase the icons from your computer and start fresh.

  • To delete Safari's icon cache using the Finder, open your user folder, navigate to ~/Library/Safari/Icons and delete its contents.
  • Safari Speed can purge all currently stored Favicons and prevent any new ones from being saved.

Delete the Preferences File

If your Safari Preferences File has become corrupted you may notice glitches and problems when browsing the web. You might not be able to load certain web sites or experience time outs and error messages. By deleting the preference file you may fix these problems, but you will also lose all your settings (e.g Tab behavior and default home page)

  • Safari stores its preference file (plist) in your user folder. First, make sure you quit Safari. Then, using the finder, open your user folder and navigate to ~/Library/Preferences/. Delete the file named 'com.apple.Safari.plist'.
  • MacRumors' guide to deleting preferences files provides more instructions on how to achieve this.

Disable Add-ons

Add-ons, such as PithHelmet or Saft, whilst extremely useful, can be the source of performance or stability issues. Fortunately, most utilities like these have an option to disable their functionality to allow you to troubleshoot. You could also choose to remove them from your computer altogether. To do this follow the instructions on Apple's Safari add-ons technote.

Adjust the 'Render Before Display' Timer

Safari uses a technique to decrease loading times by pausing for 1 second before displaying content so far recieved. When information is first downloaded from a website, Safari uses this time to commit maximum resources to rendering the HTML code before displaying on screen. It is possible to adjust this timer to force Safari to display a page earlier. Note that this will actually increase load time as Safari is not able to render as quickly if it is also updating the display at the same time, but it can be considered as a perceived performance increase. To change the timer follow these steps:

  • Quit Safari
  • Open a new Terminal window.
  • Type the following:
    defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.25
  • You can substitute 0.25 for any numerical value from 0 to 1 seconds (e.g 0.5 or 0.75.) 1 is the default.
  • Press enter to save.
  • Close the Terminal application and re-launch Safari.
  • Test for changes

Your mileage may vary, and if you find little difference you might wish to reset the timer to its default settings by performing the above steps again and entering 1 as the numerical value.

  • David Hyatt (a Safari developer), discusses this delay in an archive of his Surfin' Safari Blog here.

See Also