7 steps to Speed up website loading – Website Optimization Tips -Part 1
A faster and quick loading website is a major factor behind the success of a website. Web users doesn’t show interest in a slow loading website.Most of the website owners and site admins face problems with the loading speed of the web page or website.The main thing to remember here is that reducing the number of HTTP requests in your page reduces the loading time and makes the website fast.If you can implement the guidelines explained below ,you can achieve a minimum of 70% faster website.
There are several factors which hinders the website performance. Here is a checklist and methods that can be used to overcome this.
1.Include Expires or a Cache-Control Header
Most of the web pages will use multiple scripts, style-sheets, images, and Flash in the same page.More and more of these files will be added to achieve more and more functionality.When a visitor access your page for the first time may have to make several HTTP requests, but by using the Expires header you make those components cacheable.This avoids unnecessary HTTP requests on subsequent page views and these expire headers should be used on all components including scripts, stylesheets, and Flash components.
2.Gzip Components and Compression methods
Beginning with HTTP/1.1, web clients indicate support for compression with the accept-encoding header in the HTTP request.The web client can sent the following values as the accept-encoding header
Accept-Encoding: gzip, deflate
If the web server sees this header in the request, it may compress the response using one of the methods listed by the client.
But to achieve this we may need to make some changes specific to the web server used.
Gzipping generally reduces the response size by about 70%.
ONe important thing to note here is that ,if you use Apache web server, the module configuring gzip depends on your version.
Apache version 1.3 uses mod_gzip but Apache 2.x uses mod_deflate.
3. Combine script and CSS files.
This reduces the number of HTTP requests fired to the server.Combine all the scripts into a single file and combine all CSS into a single CSS file.This process improves response times even though it may difficult to achieve since multiple pages will have different css and scripts included.
Similarly image maps reduces the number of HTTP requests speeds up the page.It combine multiple images into a single image.
4. Where to place Style sheets and scripts.
It is proved from experiments that Style-sheets which are placed on top of the pages loads faster. Since the scripts block parallel downloads and if you keep scripts on top,the other parts of the page will get rendered afterwards.
But if you keep scripts in multiple hosts you can get more than two downloads to occur in parallel.
Minification is the practice of removing unnecessary characters from code to reduce its size thereby improving load times.
6. Avoid Redirects
The redirects using the 301 and 302 status codes slow down the user experience.So better avoid that.
7. Check and Remove Duplicate Scripts
This is unnecessary and inefficient.Usually it is observed that these unnecessary HTTP requests happen in Internet Explorer, but not in Firefox. In IE it generates two HTTP requests during page loading if an external script is included twice and is not cacheable.