Just shaved 3-5 seconds off my page load time
Last Update: June 15, 2012
So recently I and others looking at one of my physical product affiliate sites noticed that it was really slow just waiting for the server response once a link was clicked.
We're talking click link..... wait... wait.... wait up to 5 seconds... then finally the url changes.... and then another 2-3 seconds go by and FINALLY the page loads!
There's no way anyone's going to stay on the site long with that sort of thing happening!
So I set off to figure out how to speed things up - long story short, it ended up being that the social scripts I was loading (Facebook, Twitter, G+, and Pinterest) were all blocking and taking a lot of time to download, and the way the site is designed, those resources had to all be in place before the page would render.
I decided to try taking them out, and whoa, my page load time went from 3-5 seconds down to about 1-2! Now, that's not to say I might not add them back in at some point, but honestly right now, I don't care too much if people hit the social buttons for the stuff on my site at the moment because a lot of it is just catalog product links that link back to the merchant site.
However, it could just have easily been some other script loading an external resource.
Moral of the story - if it seems like your site is slow, first check it out with http://www.webpagetest.org/ - and then once the test completes, look to see if there's a long green bar for the first resource that loads (in the waterfall view - will make sense once you see it). That's called "Time to First Byte", and if it's really long & slow (like mine was), it may be an indication that you're loading too many external resources/javascripts up front and need to either find a way to load them in a different order, or perhaps not use as many.
We're talking click link..... wait... wait.... wait up to 5 seconds... then finally the url changes.... and then another 2-3 seconds go by and FINALLY the page loads!
There's no way anyone's going to stay on the site long with that sort of thing happening!
So I set off to figure out how to speed things up - long story short, it ended up being that the social scripts I was loading (Facebook, Twitter, G+, and Pinterest) were all blocking and taking a lot of time to download, and the way the site is designed, those resources had to all be in place before the page would render.
I decided to try taking them out, and whoa, my page load time went from 3-5 seconds down to about 1-2! Now, that's not to say I might not add them back in at some point, but honestly right now, I don't care too much if people hit the social buttons for the stuff on my site at the moment because a lot of it is just catalog product links that link back to the merchant site.
However, it could just have easily been some other script loading an external resource.
Moral of the story - if it seems like your site is slow, first check it out with http://www.webpagetest.org/ - and then once the test completes, look to see if there's a long green bar for the first resource that loads (in the waterfall view - will make sense once you see it). That's called "Time to First Byte", and if it's really long & slow (like mine was), it may be an indication that you're loading too many external resources/javascripts up front and need to either find a way to load them in a different order, or perhaps not use as many.
Join the Discussion
Write something…