This post is aimed at WordPress plugin users (I use it on this site) and after reading a couple of great articles about speeding up your website I thought I’d throw out a cautionary notice about WordPress plugins hijacking all your hard work.
Implementing the various suggestions from ySlow can be a laborious process, it’s well worth the effort though because done right, the speed improvements are very noticeable and significant.
Unfortunately, you can actually undo some of your hard work by not checking your plugins after you switch them on because many of them are written to add in calls to their own JS in the head of your site. This can be problematic if you add all your JS in the footer file.
What to do?
Depends how far you want to take it really. I’ve sometimes switched on a plugin to find it’s added as many 5 new JS files into the head of my site (Disquss comment system I’m looking your way) and some of these are tricky to strip down and rework into the footer.
Others you can though, and if you really want to push the boat out, check out this write up on registering your JS like a WordPress master.
Don’t fear editing plugins
On many of the WordPress plugins it’s relatively straightforward finding the piece of code that inserts the JS into the head of your document.
If possible, I usually strip out the code and add it into a “sitewide-settings.js” file that I call in my footer and then remove the plugin code that inserts JS into the header.
It’s a little extra work but if you’re gunning for top marks on a ySlow test, it’s worth bearing this in mind and playing around with your plugins if you can.