• About Us
  • Services
  • Case Studies
  • Blog
  • Contact Us
  • 30 Ways to Optimise Your Site for Speed

    speed*

    Site speed has been the foremost discipline of website optimisation since even before SEO appeared. In the early days of the Internet, connections were so slow that people jokingly referred to the WWW as the world wide wait. I remember those days. I used to type in a URL and then take a book to read while it was loading.

    I’ve been using a high speed connection (DSL) for a decade now and most people now do too. Nonetheless, some people are still using modems, while mobile Web use has emerged as an important part of Web traffic. Many people still pay by volume, and mobile connections are not usually really fast yet.

    That’s not all though. Users with a fast connection tend to be very impatient. Waiting a few seconds for a loading page makes many users bounce (or flee) straight away. Thus in 2010 Google decided to take site speed into account as a direct ranking factor. Some SEO experts argue that it’s not a really important ranking signal, but the proof is rather anecdotal.

    So at the end of the day you still need to optimise your website (or re-optimise it) for speed for a bunch of reasons. The good news is that there are plenty of ways to do so. I’ve listed 30 ways to optimise your site for speed below: I’ll start with the obvious ones which  many people nonetheless tend to forget these days, as they use fast connections themselves.

     

    Media

    1. Use smaller images – while images are not a problem for most Broadband users, they will still slow a site down significantly. You can resize and compress the same .JPG image so that it’s 50kb instead of 200 and still bring the point across. A very simple program like IrfanView can do it for you.

    2. Use fewer images or gallery scripts instead – unless your site is about images, you don’t need to load several images at once. For more than a few images you can use gallery scripts.

    3. Use fewer Flash animations or elements – you don’t use Flash as a web design element these days. Flash is used for webware, audio and video players, but most animations and Flash enhancements are obsolete by now.

    4. Don’t use video – do you really need to load this video on your homepage? Consider video an additional asset that you show on demand on an extra page.

    5. Don’t use audio – the worst thing to do on the Web is autoplay an audio file. I have a special tool that blocks unwanted music installed. In all other instances you can stream it on demand once the user clicks on it.

     

    Files

    6. Make fewer http requests – some simple websites send a hundred or more http requests; that means for each tiny image or script the site sends a request to the server. Consider whether you need each of the requests.

    7. Merge image, style and script files – the most obvious way to limit http requests is to merge files. Having several CSS or Java Script files is, in many cases, not needed anyway. Use so-called CSS sprites to merge images.

    8. Server side compression – you can compress files using Gzip or PHP.

     

    Scripts

    9. Use external scripts – don’t use inline scripts in actual HTML pages. Use external script files, or even better just one file.

    10. Use short names for variables, functions and the like – a function like removeelementfromgroup() can be called refg() as well.

    11. Use object oriented programming – OOP provides reusable script elements which you have to define once and can use all over your site instead of redefining them for each function etc.

    12. Don’t use several redundant JavaScript libraries – while Java Script libraries provide great OOP elements you can reuse, I see more and more sites using several JS libraries at once, despite the fact that those libraries provide basically the same features.

    13. Don’t use font replacement – font replacemnt tools for headlines look neat, but they are  either built in Flash or in Java Script or both, and require considerable resources.

    14. Cache your AJAX – apparently it’s quite easy to cache AJAX in order to save time on repetitive requests.


    Web hosting

    15. Switch to a faster server – SEOptimise switched to a faster server, or rather web hosting provider, a while ago. The old one was slowing down the site significantly.

    16. Use a local server – take at a look at your analytics and find out where most of your users come from. Then host your site there instead of sending them to the other end of the world each time.

    17. Use cloud hosting – shared hosting, or even dedicated servers, are fine most of the time but under a heavy load they become slow or can even time out. Cloud hosting, at least theoretically, does not, as your content is spread across many servers as is possible or needed in case of a large spike in traffic.

    18. Use CDN – so-called Content Delivery Networks combine some of the advantages of local and cloud hosting. In a CDN, content is served from a server physically in the vicinity of the request.

     

    Code

    19. Load external scripts at the bottom – back in the day, you had to add Google Analytics to the head of an HTML page. So when GA was down, the whole page didn’t load. Make sure you load external scripts at the bottom of the page whenever possible.

    20. Clean up your code – every site I check has some redundant code; sometimes even whole parts are not used, or they are enclosed in a comment. Clean up everything you don’t really need.

    21. Don’t use tables – back in the day, people used tables to structure page content. With CSS and web standards this way of using HTML became obsolete, but many people (or rather programs) still do it to this day. Consider replacing tables with lists and layers (divs) to save lots of redundant code.

    22. Compress your scripts (by removing white spaces in script files, for example) – even the most effective files still have lots of white space which enlarge them unnecessarily. While HTML and CSS may be a bit more difficult to compress, it’s easily done with scripts.


    Databases

    23. Don’t do URL rewrites – clean URLs are very important for SEO and usability, but it can increase the load time. Consider using clean URLs from the start instead of merely rewriting them. Also, Google can now index dynamic URLs that aren’t too complex. Something like shop?p=shoes&b=adidas&s=45 gets treated like shop/shoes/adidas/45.

    24. Make fewer requests – again, you can save time by sending fewer database requests, especially for popular websites. For instance, you could use the same field for the html title tag, h1 and alt attribute of the header image. That’s one request instead of three.

    25. Cache files as static data – instead of building each page for every user, each time you can save pages as static files – aka cache them. WordPress has a plugin for this WP Super Cache.

     

    External services

    26. Don’t activate Gravatar – sadly, Gravatar, which is used on WordPress by default, sends lots of requests. Even the default graphics are unique for every user who comments on your blog. You can save a lot by dumping Gravatar.

    27. Don’t embed Facebook elements – while including Facebook tools on your page makes your content more shareable, you have to think twice before doing it. Do you have a significant audience on Facebook? Facebook tools loads dozens of elements to your site. Even Twitter buttons can slow down your site.

    28. Use fewer web analytics tools or self-hosted ones – I have to admit I’m a web analytics junkie; I use Google Analytics, Piwik, Woopra, Reinvigorate on my sites at once. That’s a risk, of course; whenever one of them takes longer, your page does as well.

    29. Use the faster Google Analytics embed code – there are at least two ways to include Google Analytics in your pages:  the traditional one and the asynchronous one. The latter loads data in the background without halting your page load.

    30. Don’t integrate third party widgets – widgets are all the rage now, especially third party ones. You can add all kinds of widgets to your site. Most of them are not really earning you money, while they increase load time.


    You probably noticed that some of the techniques described above ask you to remove some features you might miss, and indeed the removal of some of them might even harm your SEO. So you always have to consider both sides of the equation and decide what’s more important in a given situation:  speed or the actual feature.

    We face many of these issues ourselves, as I have been testing SEOptimise for site speed recently. Do you optimise for site speed or do you ignore it? What changes did you implement?

    * Image by Stig Nygaard

    FOLLOW
    ABOUT THE AUTHOR
    I help people with blogs, social media & search. I help you succeed on the Web. I've been online publishing for 15 years. I started back in 1997.

    21 Responses to “30 Ways to Optimise Your Site for Speed”

    1. Ryan Beale says:

      Great Post, Tad. How would you determine if the reason why your site load speed is slow due to shared hosting versus multiple wordpress plugins/scripts/gravatars/etc? Is there a tool that you use to see if the reason why page load speed is slow due to a poor web host/shared hosting?

      Thanks in advance!

      Ryan

    2. jonnyjaniero says:

      -get your js loading last
      -conditionally load js only when needed. i noticed on this site you use the contact form 7 plugin, you dont need the js and css loading on every page.
      -disable wp plugin css and add to your own stylesheet
      -sprites are great
      -allow for gzip compression via htaccess
      -configure expire headers via htacess
      -use a wp cache plugin (correctly) and desirably, via htaccess. the default ‘turn on’ doesn’t always do a good job.
      -good markup. dont duplicate h1 tags.

      but all said and done, you can optimise til the heavens open, getting an A-grade on y-slow is always easy, but if you are on shared hosting (like me), you’ll always be frustrated by speed.

    3. Tad, this is a totally awesome post! Thank you for putting it together.

      Ryan has a good question, to which I would also like to know the answer. Also, in addition to the diagnostic part, what other WordPress plugins are good to speed up a busy blog’s load speed (e.g. you’ve mentioned WP Super Cache… what else?) This may also be a good topic for a stand-alone blog post.

    4. Tad Chef says:

      Ryan: Good question, I may follow up with a list of 30 tools for site speed SEO ;-)
      Try the following:
      http://tools.pingdom.com/fpt/
      http://www.websiteoptimization.com/services/analyze/
      http://code.google.com/speed/page-speed/
      http://developer.yahoo.com/yslow/

      jonny: Thank you for the excellent advice!

      Geno: You are welcome. For WordPres consider also this list:
      http://www.incomediary.com/15-ways-to-speed-up-wordpress/

    5. Ryan Beale says:

      Thanks, Tad. Ill check out those tools and look forward to your post on the list of 30 tools for site speed. :)

      @RBeale

    6. Interesting links week #8-Inside Indivirtual says:

      [...] 30 Ways to Optimise Your Site for Speed [...]

    7. Cynthia says:

      Having a website crammed with pictures and other things that the site takes time to load loses value. Yes, it true that people like websites that are very good to look at but there is no need sacrificing the speed of your site. Great post!

    8. Its important that your website is clean and well presented. Less can sometimes definitely be more.

    9. faycal says:

      Good list, which sums up most of the cases we encounter as designers/ developer.
      I think emphasis should be put on google anayltics and widgets which slows tremendously things on loading a page.

    10. Ali Jee says:

      Website design and load time comes highly into play especially during internet marketing campaigns. I know personally that all too often certain sites have such ow load times that the bounce rate are usually hitting the high 80 or even worse 90% range. The stuffing of CSS and Javascript code in the source code very often slows the site load time and also deteriorates the effectiveness of the crawl rate. CSS is crucial for example when it comes to site load time, or even SEO in general. Check out this blog post as well: http://blog.9thsphere.com/blog/future-of-internet-marketing that touches light on how and why to use CSS effectively for your website. Using CSS Sprites, where possible and to do effects such as drop shadows, boxes, rounded corners etc (like the way mentioned in this blog post) all help with a cleaner, smoother and faster website.

      Anyways, thought I’d share my 2 cents – nice post.

    11. [...] three tips: Geoff McMahen Motion Audio 7 4) link of the week: Thirty ways to optimize your site for speed 5) Action item: Check your website speed. http://tools.pingdom.com/ Share this podcast with [...]

    12. 14 CMS ‘Wish List’ and ‘Must Haves’ for SEO | | says:

      [...] site speed now a ranking factor and Google’s increasing obsession in returning quicker results, it’s [...]

    13. 14 CMS ‘Wish List’ and ‘Must Haves’ for SEO | SEO Training Blog says:

      [...] site speed now a ranking factor and Google’s increasing obsession in returning quicker results, it’s [...]

    14. [...] I didn’t expect faster website load times to improve the rankings of my website. I blogged about Google and site speed a long time ago. My friend Tad did a useful article a while ago, too - 30 Ways to Optimise Your Site for Speed. [...]

    Leave a Reply