5 Quick Ways to Boost Your Website Speed

By February 9, 2015 Mobile, Website No Comments
Website performance

High speed connections are becoming a norm these days. Many users are however, still using connections on 3g or low speed internet connections on their mobiles. Users also want the websites to load quickly.

The ideal load time for any website is 200 ms. However, we see that most of the websites take 5-10 seconds to load up because of many reasons. The themes brought mostly from websites like themeforest although look great but they have major issues with load times.

In this article, we look at 5 quick ways you can use to boost your website speed. Again speed is not only a factor for users but it is also one of the 200 factors used by google to rank websites.

Website Speed #1 – Enable Gzip compression

Gzip compression allows browser to request compressed content from your web-server. Gzip locates similar strings within your files and replaces them temporarily to make your file sizes smaller. All modern browsers support Gzip so its not a problem.

It works great on html, css and javascript files because these files have lot of whitespace and repeated text.  This can reduce the file size by up to 70%.

Gzip doesn’t work on image files as they are already compressed. Gzip compression is enabled at server level. You need to check if you are using apache or iis and depending on the server, you need to follow the right steps to enable gzip compression on your server

Website Speed #2 – Defer Parsing of Javascript 

Javascript takes a lot of time to load and each javascript file is a blocking request. This means that the  browser will first load the javascript file as soon as it encounters one before it does anything else. Now this may be important for applications like gmail where javascript is critical to run the application. It is not important for most of the normal websites.

You can defer parsing of javascript by using  <script async> where required.  This prevents the javascript from blocking the initial page load to a later time when the browser is not busy doing anything else.

Website Speed #3 – – Reduce Number of Files

The higher the number of files references in your page. The higher the http request. This means DNS is resolved for each page and each page has its own response. e.g your page has 10 javascript files, 10 css files and 10 image files. This means your page is sending 30 different requests to server.

Since browsers load the files in batches of 5-8 files, it may take 4-5 batches to load these 30 files. It is best to reduce the files so browsers can load them in minimum batches.

In wordpress, the most famous modules like w3 total cache and in drupal, modules like advance aggregator allow you to combine javascript and css files. For images, there is a technique called css spriting which allows you to put all the images in one file and use css to display different areas of images. 

Website Speed # 4 Use Browser Caching  

Most of the files like javascript files, images like logos and css files are unlikely to change over a period of days or weeks probably. It is best to specify browser to cache these files so that they don’t load every time a user visits the website. This allows for better load time for repeated users on your website and providing them with a better experience.

Website Speed Number # 5 Optimize images

It is very important that all images used on your website are properly compressed. Sometimes we also use width and height attributes to create thumbnails from bigger images.  These images a real drain on bandwidth and should be avoided. You can use plugins in cms like wordpress and drupal to generate thumbnails of images when they are uploaded and use those images in your theme.

Optimizing images can greatly affect your site speed as images are the heaviest resource on most websites and optimizing them can greatly reduce your site load times. Using technique like CSS Sprites can further decrease the number of images on your website and affect your site load times.

Conclusion

For most of these techniques, you would need some development background. A very easy technique to automatically do these on your website is to use CDN like cloudflare which will automatically do most of these things on your website. However, sometimes cloudflare’s RocketLoader which forces all javascript files to reduce asynchronously can break your website so it is very important that you test your website fully after applying CDN.

 

Source: images by freepik

 

Subscribe and never miss a post!
Subscribe to the free newsletter now. (No spam, we promise)
Related Articles
Google-Webmaster-Tools-Logo
Fix Mobile Usability Issues on http//www.yoursite.com
Validate your app idea
How to Validate Your App Idea as soon as possible?
blog_3
Is your app ready for iOS 8?