Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,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 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[101,697 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 whomever posted them. This site is not responsible for what they say.
Increase Safari's page loading speed
Authored by: spacehaven on Wed, May 19 2004 at 11:21AM PDT
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 Wed, May 19 2004 at 4:03PM PDT
this hint is awesome!

[ Reply to This | # ]
Increase Safari's page loading speed
Authored by: gdsimms on Wed, May 19 2004 at 11:40AM PDT
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 Thu, May 20 2004 at 4:16AM PDT
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 Wed, May 19 2004 at 12:24PM PDT
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 Wed, May 19 2004 at 2:20PM PDT
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 Wed, May 19 2004 at 2:32PM PDT
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 Wed, May 19 2004 at 5:11PM PDT
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 Wed, May 19 2004 at 5:31PM PDT
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 Thu, May 20 2004 at 1:18PM PDT
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 Thu, May 20 2004 at 4:03PM PDT
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 Wed, May 19 2004 at 6:38PM PDT
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 Wed, May 19 2004 at 8:17PM PDT
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 Thu, May 20 2004 at 1:10AM PDT
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 Thu, May 20 2004 at 12:05PM PDT
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 Thu, May 20 2004 at 2:53PM PDT
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 Thu, May 20 2004 at 7:43PM PDT
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 Fri, May 21 2004 at 8:01PM PDT
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 Mon, May 24 2004 at 4:13PM PDT
Perception is reality.

It feels faster therefore it is faster.

---
d a v e

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

[ Reply to This | # ]