We ramble about code, technology and life. Sometimes we actually code...

Speed optimisations

by Cornelius Weidmann on 2 June 20142 min read

When it comes to delivering the best user experience it is vital to focus most of your time on creating pages that load quickly.

Speed should be your number one priority when building anything on the internet. Making your app look strikingly beautiful should not be your priority. Why? You can have the most visually appealing site, but if it doesn't load quickly enough your potential user will be gone before he/she even saw the full picture.

There are A LOT of things you can do to speed up your site/app. Listing them all here would take too long. Thankfully there is an excellent pool of information out there on the web specifically devoted to speed. I would encourage everyone remotely interested in speed optimisations to look at Yahoo Exceptional Performance. It is a very informative and concise list.

Here are my top three tips for speed optimisations:

  1. Reduce number of HTTP requests! If you're loading two external JavaScript files you're already loading one more than you should. JavaScript and CSS/SCSS minifiers are abundant out there in the wild internets, make use of them.
  2. Optimise large images and try to create sprites. If you're loading a 1MB image on your homepage you are failing badly.
  3. Make use of browser caching! Gzip your content.

If you can do the above you'll most probably speed up your site by 60-70%. The other 30-40% is hard work and can be achieved by implementing best practices as pointed out in the exceptional performance guide by Yahoo.