10 Things you can do to Speed Up Your Website


To speed up your website has become very important for two reasons. First reason is that 80% of internet users won’t wait longer than 10 seconds for a page to load. The second reason is that Google takes a websites loading time into consideration when ranking them. Therefore, it has become crucial to speed up your website. Please note that a website should actually be completely loaded well before the 10 second time frame for SEO purposes. Therefore it goes without saying that if you speed up your website you will prevent potential customers and visitors from leaving your site, as well as having the advantage over your competition when it comes to rankings. Here are 10 things you can do to speed up your website.

1. Optimize Your Images

Optimizing your images for online media can be tricky. The trick is to get the right balance between picture quality and file size. If you look at any web page, and you will see that most of it’s load time comes from the rendering of images. By not optimizing your images, you won’t be able to speed up your website. Also, to speed up your website, it is a necessity to specify the width and height of images within your HTML code. The text of your page loads faster and by not specifying the width and height of images, the browser will have to reposition the text once the images have loaded. If you take the time to specify the width and height of your images, the browser will lay out the text where it should go from the very start, even before it loads the images, saving you valuable time and thereby allowing you to speed up your website.

One of the best programs to optimize your images with is Photoshop. There are also some free alternatives, one of the best being Smush, a relatively new online image optimization plugin provided for WordPress.

2. Use less DIV tags

A common mistake amongst web designers is the over using of DIV tags in their mark-up. This is more commonly referred to as ‘divitis’. Having too many unnecessary DIV tags can drastically weigh a website down and work against your goals to speed up your website. What I normally do when designing is start with the content. I then mark it up semantically. Then apply the styling to the website. While doing this you may find that you need to wrap some things in DIVs to group them and apply styling to them. I do it this way because I know that I won’t end up with more DIV’s than what I actually need. Also, to speed up your website, one should also avoid using tables. A better option would be to use pure CSS layouts as this will minimize the need for additional mark up code.

3. Place CSS and Javascript Into External Files

This is an important step to speed up your website. Browsers will cache CSS and JavaScript and re-use them when visitors go to the other pages. This will prevent the browser from having to reload the the CSS and Javascript for every page.

4. Fix Your Code

Badly programmed web applications can and sometimes are responsible for browsers crashing. Not only that, it will prevent you to speed up your website.

5. Minimize White Space

In most cases this not a major factor. All comments and white spaces simply increases the file size of your HTML, CSS and JavaScript. And if you have a lot of them, it does add up. You can manually remove them yourself or you can download YUI Compressor to remove spaces for you.

6. Put CSS At The Top And Javascript At The Bottom

By putting CSS at the top of the page, the page will be formatted correctly. Otherwise the browser will have to systematically go through each line of code until it arrives to the CSS and then go all the way back to the top to format the page sections that were loaded before the CSS. Obviously this is not a very efficient way to go as it prevents you from being able to speed up your website. With javascript, browsers will wait until the script is loaded and executed before it proceeds with loading anything else that comes after that JavaScript code. JavaScript also depends a lot on page elements. If loading JavaScript on the top of the page you will in most cases get an error. JavaScript that loads before the element IDs were established can’t find the ID which you are referring to. With all things considered, it is best to keep JavaScript at the bottom of the page.

7. Apply Gzip Compression

Modern browsers have the ability to read and display Gzipped content. By pre-compressing CSS and JavaScript you can significantly speed up your website by large amounts. It also reduces your bandwidth which helps to speed up your website.

8. Keep Your Cookies Small

Cookies get loaded with the headers before the content gets loaded so keep them as small as possible.

9. Use Caching

The value of caching depends on the kind of traffic your site gets. It is not uncommon for websites to have 80% first-time visitors that arrive through search engines. If your audience are one-time visitors, then caching won’t help much to speed up your website, but if your audience are mostly repeat visitors, then caching is a major factor in the process to speed up your website.

10. Avoid Dynamic Page Creation

If creating plain static HTML pages then this step won’t apply to you. This would only apply to websites making use of a publishing platform like WordPress or Drupal. Most of them generates dynamic content by default. This means that for every visitor a PHP script is running a database query to get the template of the page. There are ways around this.

This is by no means an exhaustive list as there are a number of other causes that can slow a website down and negatively affect the ability to speed up your website. These include things such as database defects and hosting your site through a bad hosting company. Google suggests that each page be no more than 150KB in size and if you seriously want to speed up your website, you can always use an online service to examine and analyze your website.