During my recent investigations into responsive web design and building this sites theme, I’ve been becoming more and more obsessed with file size and more specifically page load speed. I do a lot of browsing on my phone when I’m away from my computer so I’m constantly reminded of the difference a well-optimised site can make to the user experience.

Some random kick up the arse

Some Random Dude pushed me over the edge the other day with a great write-up on his own optimisations for his own lightweight and responsive wordpress theme, Frank.

I’ve now revisited some of my more fanciful decisions which on reflection, were more form-over-function (and even then very debatable as to the impact on form :P).

No more webfonts

The webfonts I had used were good fun to research and an interesting experiment but really didn’t add any value so I’ve removed them. This blog is as far from a design resource as you can get so why burden readers with having to wait for fonts to download?

No more jQuery

Equally, the responsive menu I implmented is pretty much the only Javascript used on the site so far, yet I was relying on the entire jQuery library for a menu which at the moment only 3% of visitors will see! I originally started replacing the functionality in pure Javascript but quickly came to realise that jQuery is actually doing quite a bit in terms of cross-browser compatibility and cleaning up code. So I spent some time looking around at some lighter-weight alternatives and have settled on xui.js for now which I’ll write some more details on in a future post. I’m not completely sold on ditching jQuery as especially with CDN caching I’m not sure how much of an impact this change will have but certainly a worthwhile exercise nonetheless.

WordPress Plugin Diet

So with my new obsession with filesize addressed I pushed my reduced-fat theme up to my live blog and checked the network tab in Google Chrome. The biggest request was… jQuery! huh? Turns out, I was using a number of plugins that, understandably, relied on jQuery and had tapped into the wp_head action hook to demand jQuery be loaded. So I’ve been ripping out plugins that whilst offer me some convenience, are penalising my visitors. I’ve still got more to clean up (some of the formatting plugins are loading their dependencies on every page even when not needed) but I feel like I’m on the right road and have significantly reduced the page size and load times for my site.