Improving the Performance of your Website

yslow-score@2xHaving a fast website is important for both SEO and User Experience (UX). If a site is too slow to load, people are more likely to move on to something else.

This is a short list of fairly easy activities that can be accomplished by any competent web developer which will have a major impact on your site experience.

  1. Measure Your Site Performance – before you do anything, install YSlow and measure your site’s performance. This will give you a baseline and you can re-run the test with each iteration to confirm that performance is improving.
  2. Enable Compression – make sure that your web server supports gripping text content (HTML, JS, and CSS). This is even more important than minification because it can enormously reduce your payload size.
  3. Optimize Images – most images produced by Photoshop or other graphics programs can be optimized further by specialized software like ImageOptim on the Mac or Smush.it online.
  4. Use a CDN for JavaScript Libraries – major libraries (like jQuery) are easily available via a CDN like Google’s. Make sure that you’re still using the minified version of the library and it can be a good idea to include a local fallback.
  5. Minify and Concatenate JavaScript –  while major libraries, and code that changes frequently should be in their own files, any plugin JS should be minified and concatenated into its own library. You can use a tool like Grunt to make this easier.
  6. Minify and Concatenate CSS – minifying your CSS and concatenating it into a single file reduces the size and number of HTTP requests the browser needs to make. This should be a standard part of your development or content delivery process.
  7. Reduce 3rd Party Integrations – every 3rd party integration you include (Twitter, Facebook, Analytics, etc) takes a little (or a big) bite out of your performance. Review the integrations you have in place and determine if they’re all really necessary.
  8. Load 3rd Party Integrations Asynchronously – any 3rd party integration you do need should be loaded asynchronously so that its impact on your site performance is minimized.