25

Are there any ways in which I can improve the loading speed of a website?

I know that Google is really pushing loading speeds and with the popularity of mobile websites it's now imperative that sites load quickly.

2 Answers 2

26
  1. Yahoo's tips for improving page sped
  2. Google's tips for improving page speed
  3. If you're using PHP, Google's tips for making PHP faster

Here's a basic list as comprised from Google's Page Speed addon (here's Yahoo's YSlow):

  • Leverage browser caching
  • Specify image dimensions
  • Avoid CSS @import
  • Avoid bad requests
  • Combine images into CSS sprites
  • Defer parsing of JavaScript
  • Enable Keep-Alive
  • Enable compression
  • Inline Small CSS
  • Inline Small JavaScript
  • Make landing page redirects cacheable
  • Minify CSS
  • Minify HTML
  • Minify JavaScript
  • Minimize redirects
  • Minimize request size
  • Optimize images
  • Optimize the order of styles and scripts
  • Prefer asynchronous resources
  • Put CSS in the document head
  • Remove query strings from static resources
  • Serve resources from a consistent URL
  • Serve scaled images
  • Specify a Vary: Accept-Encoding header
  • Specify a cache validator
  • Specify a character set
  • Defer loading of JavaScript
  • Remove unused CSS
  • Use efficient CSS selectors

I strongly recommend using either Google's or Yahoo's page speed add-ons to test out your pages. It's fast and easy to do and offers clear guidance on how to improve your page speeds.

update

As recommended by Nick in the comments here are some more good resources and information:

update 2

Here's come good stats that shows why page speed is important (source)

5
  • 2
    +1 Also worth mentioning Steve Souder's tips here: stevesouders.com/hpws/rules.php and his book here: stevesouders.com/blog/2009/04/23/even-faster-web-sites These were Facebook's go-to references when they first optimised their site: facebook.com/note.php?note_id=307069903919
    – Nick
    Commented Jun 15, 2011 at 14:05
  • I've got a feeling something in my header is making the site chugg along!
    – Rob
    Commented Jun 15, 2011 at 14:06
  • I am not sure that I like this answer as it does not really describe how to make a fast website, only what you can tinker with to get it faster. It is a bit like saying 'add a spoiler on a car' - which anyone can do - but you have to understand the general principles of aerodynamics for it to make sense and therefore to be done properly. Commented Jun 15, 2011 at 14:11
  • @Matthew, the Google and Yahoo add-ons and pages describe why these optimizations help. The informative as well as useful.
    – John Conde
    Commented Jun 15, 2011 at 14:12
  • Just had a score of 89/100 for Google speed check, pretty good considering I haven't attempted any speed optimisations.
    – Rob
    Commented Jun 15, 2011 at 14:22
1

Try CloudFlare http://www.cloudflare.com/plans

CloudFlare is a content delivery network and distributed domain name server service marketed as improving website performance and speed and providing security.

Not the answer you're looking for? Browse other questions tagged or ask your own question.