How to make your website faster
Posted in: Speed Up Tips   -   August 2, 2012

If you’re wondering how to make your website faster, there are various components to consider that could be hindering your speed. Performance bottlenecks on the web fall into one of 3 categories:

  • Hardware
  • Network
  • Software

Hardware related performance bottlenecks are often the easiest to fix – just add more, better or faster servers. There’s not much you can do about network latency as it’s really just a limitation of physics (although we’ll talk about CDN’s later). Software can be broken down into two main components — backend and frontend. The backend includes your database and server side code (your PHP, Java, etc). The remaining time is spent processing the frontend of your website, things like your HTML, CSS, JavaScript and images. In fact, it turns out that about 90% of the time it takes to load a website is related to frontend components.

So, if you want to make your website faster, your best bet is to focus on your frontend as this will usually give you the most bang for the buck. There are dozens of different optimizations that can be used to speed up your frontend, but most of them fall into the following broad categories. To make your frontend fast, you should:

  • Make things smaller
  • Move them closer
  • Load them smarter

Let’s look at each of those principles one at a time.

 

Make things smaller

Minimize your CSS and JavaScript. Strip out whitespace and comments that are left in the code by your developers. Use Gzip. Optimize your images by stripping out EXIF data and using lossless and lossy compression where it makes sense.

 

Move them closer

It takes measurable time to transfer content over the internet. You can’t change the speed of light, but you can make sure your content is delivered from servers closer to your visitors. If your website has a widespread audience, it’s important to use a CDN to make sure your content is being cached and delivered quickly around the world.

 

Load them smarter

The typical webpage is made up of dozens of separate requests. And every request has overhead. You can make your website significantly faster just by reducing the number of requests that are required to load your site. For example, you can combine your CSS or JavaScript files or use image spriting to keep the overhead to a minimum. You can fix your caching headers so browsers don’t download the same content over and over again.  You can also use advanced techniques like asynchronously loading your JavaScript or CSS to make sure your perceived performance is also fast.

 

If you apply these basic principles to your site, you will out-perform the vast majority of sites on the web today. Of course, it’s hard to improve unless you have an accurate way to measure your performance. It’s hard to lose weight if you don’t own a scale.

The first step to a lighter and faster site is making sure you have accurate measurement in place. The best way to get that is to have Real User Measurement (RUM) installed on your website. Unlike synthetic testing, where your website is loaded from a few key servers around the world, RUM uses JavaScript to measure the actual load times for every visitor to your site. This gives you access to far more data than you would have with synthetic testing. With RUM, you don’t have to make any assumptions about which variables are impacting your website performance, like whether people are visiting the site for the first time, which browser they are using, or which part of the world they live in.

We offer a Real User Measurement tool at Torbit that’s currently being used by hundreds of top retailers and major media properties. In the spirit of Speed Awareness Month we’re giving away free Premium accounts for the month of August. To get yours, simply sign up for an account at torbit.com and use the discount code “speedawarenessmonth” to claim your free upgrade.

Thank you for joining us as we do everything we can to make the web a faster and better place for everyone.

Speed on!


Josh Fraser (@joshfraser) is the co-founder and CEO of Torbit, a company that automates front-end optimizations that are proven to increase the speed of your website. Josh graduated from Clemson University with a BS in computer science and previously founded a company called EventVue. He currently lives in Mountain View and is obsessed with speed.

Tags: , , , , ,

  • David Higgins

    Awesome!

  • http://vorb.de Paul

    The title of this article is misleading. It does not explain the “how” but only the “what” to do to make your website faster. You don’t prove your statements and only advertise one application without showing any alternatives.