3 More Blog Optimization Routines

Last month, Darren Rowse asked me to contribute a post to Problogger about methods to increase page loads. He gets a lot of questions from his community and he wanted someone who had some experience in the area to help out. I obliged.

Please read it.

I wanted to follow up that article with a few page load and other optimization techniques, largely because, as I surf around the internetz, I’m noticing an increasing number of blogs that are very weighed down.

The golden rule here is that if a page takes longer than 2 seconds to load, it’s too heavy. Realistically, you want to shoot for a page load of under a second. In an era where broadband is ubiquitous, there is no excuse.

Images

While I talked about images in the post at Darren’s blog, I really want to hammer this home. Kill the background images. The textured backgrounds, though they look good, are sucking your bandwidth. The same can be said for full-size banner headers. The only image that really should be in your header is a logo and it should be cropped to the size it actually is. Unless there is just some aspect of your branding that has to be fit into a full 750 or 1000px wide header image, you’re wasting your users bandwidth and slowing down your site.

Google Analytics

This is not really a page load issue, but it is a highly valuable point that at the time of writing the Problogger article, I was unaware of. Duncan Riley actually had a fantastic pointer about Google Analytics code that suggested going against the conventional wisdom (and Google recommended) approach of inserting the code in the footer and instead placing it in the head of the page.

Google recommends (and it is standard practice for most tracking code) that the code be placed in the footer as it will end up being the last thing to load, allowing the rest of the page to render and give the appearance of a quicker load. Duncan notes, however, that sometimes readers move on before that Analytics code is loaded preventing a registration of a pageview.

Since reading that article, I moved my GA code to the header and have experienced only a miniscule reduction in load time, but have increased the number of pageview. It’s important to note, though, that the pageviews are not changing, just the perception. If you run ads, it is the perception of pageviews that advertisers are buying ads based on – so you do want this to be perceived closer to the actual pageview number.

WordPress users, reduce your plugins!

Some people love using every plugin under the sun for WordPress. It’s as bad as those people that install every Facebook app around (Love you both, Lorelle and Cathryn!). The end result is slower load time.

This could be for a number of reasons. Plugins don’t necessarily go through the same QA and optimization process as the core WordPress code therefore, the activation of a plugin could introduce inefficient code or load unnecessary PHP processes into memory. Also, plugins that provide configuration options may also expose uncertain conditions when configured in certain way. The Google Sitemaps plugin is a great example of a plugin that, when misconfigured, can cause detrimental effects on a server which directly affects load time.

As always, my recommendation is always to run a tight ship, lean and mean is the best policy, and only use what you actually need. And if you stop using a plugin, make sure you deactivate it. There’s a security aspect to this as well.

Just a few more tips from experience. Feel free to add your own in comments.

Aaron Brazell

Aaron Brazell is a Baltimore, MD-based WordPress developer, a co-founder at WP Engine, WordPress core contributor and author. He wrote the book WordPress Bible and has been publishing on the web since 2000. You can follow him on Twitter, on his personal blog and view his photography at The Aperture Filter.

One thought on “3 More Blog Optimization Routines

  1. EXCUSE ME! Remember, while I do abuse Plugins on my personal blogs, I'm on WordPress.com. I can't TOUCH WordPress Plugins there. They won't let me. They know I'm bad. :P Great article and advice, my friend, on streamlining the bandwidth. Ajax and JavaScript, with or without Plugins, is also a killer, especially if these things load BEFORE the content. I'm finding a lot of people who want to incorporate full video players into their blogs to play images and sounds. Really, why bother? It just adds more load to the page. With the world moving towards the mobile web, we have to take bandwidth into serious consideration that goes way beyond trying to honor those still on dial-up. The mobile web has a long way to go to catch up with land-line and cable speeds. We have to design nice for those bloggers and web users on the road. :DSpeaking of which, you may get two copies of this comment. Disquis' Ajax spun and spun for over five minutes and still hasn't done anything. I reloaded the page and am trying a second time. While it's a neat feature, I'm finding it slows down loading and commenting tremendously.

Comments are closed.