Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Increase Safari's page loading speed Web Browsers
Dave Hyatt made a post on his blog that describes a timer that Safari uses before it starts displaying any content. Supposedly the algorithm will be changed with the next release of Safari, but for now, you can still decrease the timer by setting a variable in Safari's preferences file.

Open Safari's preferences file at ~/Library -> Preferences -> com.apple.Safari.plist in a text editor and add these two lines somewhere inside the <dict> tag:

	<key>WebKitInitialTimedLayoutDelay</key>
        <real>0.25</real>
The default value is 1.0. Lowering the value will decrease the time Safari waits to render. Some side effects may be flashing page content as it loads, but it definitely feels faster.

[robg adds: Make sure Safari is not running when you edit the preferences file, otherwise your changes may be overwritten the next time you quit Safari. I added the lines immediately below the <dict> tag, and it seemed to work fine. Note that in Dave's post, he explains how this may actually slow real page loading times, but that perceived page loading times will decrease.]
    •    
  • Currently 2.63 / 5
  You rated: 3 / 5 (8 votes cast)
 
[127,626 views]  

Increase Safari's page loading speed | 19 comments | Create New Account
Click here to return to the 'Increase Safari's page loading speed' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Increase Safari's page loading speed
Authored by: spacehaven on May 19, '04 11:21:12AM

Allow me to be the first to say your hint rocks! I feel like I just bought a new Powerbook. Thanks!



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: thorax01 on May 19, '04 04:03:29PM

this hint is awesome!



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: gdsimms on May 19, '04 11:40:40AM
Of course you can also quit Safari and type

defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.25

at the Terminal.

[ Reply to This | # ]

defaults write not quite right
Authored by: tinb on May 20, '04 04:16:29AM
Not quite right. You need to specify the "0.25" as a float value, not a string value which is the default. So
defaults write com.apple.Safari WebKitInitialTimedLayoutDelay -float 0.25
will do it right.

[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: Felix on May 19, '04 12:24:00PM

I played around with the timing a bit while recording my usual web page load times with a stopwatch and on my cable modem connection (typically 2925 kbps downstream as measured by DSLReports), I got the most benefits when timing was set at 0.50.



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: akuma-x on May 19, '04 02:20:12PM

Thank you very much!
When I 1st saw David's post on this I was trying to figure out what I needed to change to enable this in the current Safari build.



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: atom on May 19, '04 02:32:28PM

rob,

i believe the increased loading time he is speaking of is due to the new algorithm he speaks of, where there is a range of delay from 250-1000ms. he doesn't specify though.



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: zgafford on May 19, '04 05:11:36PM

Safari resets the .plist file on every exit. I have tried 3 times and it always resets the file the next time Safari exits even if you modify the file with Safari closed.



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: robg on May 19, '04 05:31:23PM
That's not been my experience; here's a snippet from the Terminal on my machine:
$ defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.25

[Ran Safari, loaded a few pages, quit Safari]

$ defaults read com.apple.Safari | grep WebKitInitialTimedLayoutDelay
    WebKitInitialTimedLayoutDelay = "0.25";
I repeated the test a few times, and the value never changed from whatever I set it to...

-rob.

[ Reply to This | # ]
Because it's a string?
Authored by: jecwobble on May 20, '04 01:18:08PM
I haven't tried this hint yet, but could it be because the value you stored with the initial
defaults write
was a string and not a float value as stated in another reply here? The original post used "real" XML tags, though....

[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: lewisb1 on May 20, '04 04:03:40PM

I tried the above to speed up the safari. I too noticed little difference, but what happened after saving the textedit, the icon in the safari that allows you to return to home page disappeared!! Any suggestions on how to get it back??

Thanks,

Lewis

---
Lewis



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: martenj76 on May 19, '04 06:38:44PM

Yes, it's the same problem here to. Safari overwrites the plist-content everytime i quit. I do have the program shut down when i edit the plist, but it disappers at next quit of safari



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: Felix on May 19, '04 08:17:17PM

No problem retaining my "customized" setting through multiple log-outs/ins. Where exactly did you enter the two lines? I entered at the top of the first <dict> tag but after a log-out/log-in, I noticed that the two lines has been reordered alphabetically within that tag...which put them near the bottom.



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: bluehz on May 20, '04 01:10:46AM

I'm having no problems with my Safari resetting the value either.

BTW - you can read the value like this:

defaults read com.apple.Safari WebKitInitialTimedLayoutDelay

No need for the grep.



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: jpietry on May 20, '04 12:05:38PM

I have a PB G4 400 with 1GB ram, OS X 10.3.3...

I tried this both with the 'real' and 'string' tags. both resulted in pages actually 'appearing to load slower'.

My fastest page loading is with these 2 lines NOT in the .plist file.

if you place these 2 lines between the 'data' tags, inside of the 'dict' tags, they will NOT disappear each time you launch. I have the values set and sticking each launch, however, I see NO performance improvements.

FWIW

Jake



[ Reply to This | # ]
MAKE A BACKUP
Authored by: thornrag on May 20, '04 02:53:51PM

Oh boy.

I used the defaults command, which didn't work, and then I edited the text file, which worked, but also reset all my other safari prefs.

Make a backup before trying this!



[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: steeviant on May 20, '04 07:43:04PM
You can similarly increase the page loading speed of Mozilla based browsers by adding a line like this to your prefs.js file...

user_pref("nglayout.initialpaint.delay", 0);

For camino 0.8, you'll find the prefs.js file in

~/Library/Application Support/Camino


[ Reply to This | # ]
Hint DOES NOT increase page loading speed
Authored by: calroth on May 21, '04 08:01:20PM

This hint doesn't increase page loading speed. Read David Hyatt's blog.

Or at least, if it does increase page loading speed, it will do so by a negligible amount. So don't bother benchmarking it.

With this hint, Safari FEELS faster because parts of the page are drawn to screen earlier. But in reality it takes just as long as before. Of course, having Safari feel faster is quite cool and makes the experience much better, which is why Hyatt dedicates a lot of blog to discussing it.



[ Reply to This | # ]
Hint DOES NOT increase page loading speed
Authored by: demmons65 on May 24, '04 04:13:22PM
Perception is reality.

It feels faster therefore it is faster.

---
d a v e

http://www.hostwerks.com/~dave/

[ Reply to This | # ]