Improving performance on UX Design Day's website
I've been working on a refreshed design for uxdesignday.org over the past couple of weekends. As part of this I've refactored a lot of code and improved both network and rendering performance significantly.
The main conference page for Dunedin now gets a 96% page speed score measured with YSlow, which is just a little less than Google.com. Unfortunately getting to 100% is going to be tough due to some external resources setting a short cache expiry, and my images will never be scaled correctly because the site is responsive for mobile. Oh well! I can live with 96%.
Over the next few posts, I'll talk about how I improved performance both in the site code and on the server.
But first, the structure of the site.
UX Design Day is a simple responsive site. Straight HTML and JavaScript with jQuery, Stylus for CSS. Everything is compiled and minified locally using Grunt with a few Node.js libraries.
I have an Ubuntu VPS from prgmr.com with Apache configured to show whatever's in the /public directory of the repository.
I've segmented the pre-compiled Stylus into multiple files like buttons.styl, layout.styl, header.styl and so on, which are all concatenated together and minified when converted to CSS.
Grunt also takes jQuery and any extra JS libraries and sticks them into app.min.js along with my JavaScript code for the site.
Improving performance
I used Chrome's Audit tab and GTmetrix to see what I could improve. It wasn't particularly hard and probably took me about 3 hours all up to achieve a high page speed score.
In the end I did the following, each of which I'll explain in future posts.
Compressed images
Removed unused CSS selectors
Set the content type through HTTP header
Added expires headers to all file types
Added cache validator to resources
Specified width and height for images
Deferred JavaScript
Included jQuery in compiled JS
Replaced PNGs with SVG where possible
Set up a free CDN
Stay tuned for more!









