8 Replies Latest reply: Nov 25, 2008 1:41 PM by Neville Hillyer
Neville Hillyer Level 4 Level 4 (1,860 points)
I apologise if this has been covered before.

I recently investigated speeding up Safari and found some excellent pages but most appeared a little dated.

Here is what I did with Leopard:

1 - Quit from all browsers.

2 - Double click ~/Library/Preferences/com.apple.Safari.plist

3 - Open 'Root' and go to the bottom of the list to find WebKitInitialTimedLayoutDelay and WebKitResourceTimedLayoutDelay.

4 - Ensure that they are both set to 'number'.

5 - Double click the entries and set both numbers to 0.1

6 - Close the window and select 'Save' when asked to do so.

Perhaps those with more experience can improve on this.

Some historic background can be found here:

http://www.macosxhints.com/article.php?story=20050118152940322

Xserve and two 733 MHz G4s with Leopard !, Mac OS X (10.5.5)
  • Mulder Level 6 Level 6 (8,980 points)
    This doesn't speed up Safari at all; it merely reduces the delay between Safari getting the data and displaying it in the browser window. And this specific example only applies to Mac OS X 10.5, since one of these preferences doesn't exist in 10.4 or below.

    Mulder
  • Neville Hillyer Level 4 Level 4 (1,860 points)
    If you look at the link on my original post you will see that it is dated Jan 24 2005 - either a clever author with a premonition of OS X 10.5 or something is wrong with your assertion.

    I am not saying that my instructions have been tested other than on Leopard but it appears that the preferences existed in January 2005.

    My non-terminal method ensures that the change is done in the correct way rather than inadvertently changing the Class from Number to String. It also allows you to see the earlier value.

    Safari gives the impression of being faster and, in my opinion, is closer to the performance of IE on a PC. I like it.
  • Mulder Level 6 Level 6 (8,980 points)
    I am not saying that my instructions have been tested other than on Leopard but it appears that the preferences existed in January 2005.


    I can't speak to your specific experience, but I can say that the WebKitResourceTimedLayoutDelay doesn't exist in 10.4 or below, not even as a hidden preference (I have a list I obtained from Apple).

    Mulder
  • Neville Hillyer Level 4 Level 4 (1,860 points)
    I apologise. I must admit that I cannot find either preference in my OS X 10.4.11 com.apple.Safari.plist file. My tools for this are not good as the editor was not in my installed Developer Tools. I eventually examined it with a hex editor. Since there are several pre-Leopard references to this working exceptionally well via the terminal I can only assume that adding these preferences to the file causes Safari to use them.

    At some point (during the life of Tiger I assume) this preference file was changed from XML to binary making impossible to edit with a text editor. Those without Leopard who have difficulty with this could try:

    1 - Quit from all browsers.

    2 - Make a copy of com.apple.Safari.plist

    3 - Enter the following in the Terminal and press return:
    defaults write com.apple.Safari WebKitResourceTimedLayoutDelay 0.1

    4 - Enter the following in the Terminal and press return:
    defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.1

    5 - Test Safari. If it does not work then quit and replace com.apple.Safari.plist with the copy you made earlier.
  • Neville Hillyer Level 4 Level 4 (1,860 points)
    Am I mistaken or has Apple recently removed the following from Safari.plist?

    WebKitInitialTimedLayoutDelay

    WebKitResourceTimedLayoutDelay
  • Neville Hillyer Level 4 Level 4 (1,860 points)
    Further investigation indicates that these preferences do not normally exist in com.apple.Safari.plist but can be added via the terminal or Property List Editor (invoked by clicking the plist file in Leopard).
  • bdash Level 1 Level 1 (40 points)
    Those preferences have no effect in any recent versions of Safari. The code related to them was removed from WebKit back in 2004, prior to Safari 1.3 being released. What you're seeing is a placebo effect, nothing more.
  • Neville Hillyer Level 4 Level 4 (1,860 points)
    That is interesting.

    I am convinced that I did experience a considerable reduction in the time it took pages to display when I first tried this a few months ago but I have to admit that having just increased both times to 100 with no noticeable effect it does tend to indicate that you could be correct.

    Since I can no longer replicate my earlier slow load/display times I will be removing these preferences.