I have a problem with my wordpress site, it was just too slow. It was taking me 20-30 seconds to load the page, initially I thought it was nearlyfreespeech, and was contemplating moving the blog to dreamhost (both of whom happen to be amazing webhost by the way).
The reason I thought it was a host problem because my browser kept displaying ‘waiting for keithrozario.nfshost.com’ while the waiting, so I assumed that it was their servers response time. That however was too presumptuous on my part, and it took me a while to get to the bottom of things, but I finally figured it out.
So armed with firebug I booted up firefox and loaded my page. Lo and Behold, the answer was staring me right in the face:
The Status bar in firebug also gives you an indication of what’s wrong. It list the imghover.js file as 404 Not Found, which just means that the browser was unable to get the imghover.js file.
What I suspect happened was that the file is not present on my system and the browser can’t locate it, so it tries to get it until it finally gives up and times-out, a full 20 seconds later. This was the first step in troubleshooting, finding out which particular element is taking a long time to load, the next step is to fix the problem.
So then I looked at my page source, and from the page source search for the offending line that called the element (in this case imghover.js) and it wasn’t too hard to find this:
Then from here I had 2 options:
1) Remove the offending line in my wordpress theme, or;
2) Find the imghover.js from the internet and copy that to the correct location so that wordpress can find it.
A click on update, a clear of the cache, and voila problem solved.
Now when I loaded the page, there were no issues and firebug confirmed them. I’m now saving my viewers about 15 seconds of their time…Awesome.
I’m not saying you’d have the same issue, but firebug is an excellent place to start to determine the problem with your page loading time. Determine exactly which element is the slowing down the whole site, then either modify that element, or remove it from your page (like I’ve done). Each website is different and will have it’s own set of problems, this is just a generic troubleshoot guide.
To download this awesome firefox plugin, head on over to their website @ http://getfirebug.com/
To improve loading times for ‘good’ wordpress sites, or if firebug had found no issues try using a cache plugin to speed things up.
*Sorry nearlfreespeech for doubting you guys….you guys are awesome.