PressTigers

Website Speed Optimization – Need Of The Hour

One of the most frequently discussed issue in WordPress community is website speed optimization. Nowadays, it becomes a major concern for every website owner as traffic generation is associated with it. No one is ready to take the risk of losing even a single website visitor so, the need of the hour is that you need to optimize your website from both ends – Server side as well as Assets (JS, CSS, Images) side.

Optimization – Server-Side

Compression with Gzip:

Server side compression greatly reduces the time needed to process the request from client side, and Gzip is one of the best way to compress the resources sent by the server. For this purpose, use “mod_zip” with Apache 1.3 and “mod_deflate” with Apache 2.x. To enable Gzip compress using nginx server, you can use the following in the nginx configuration:

Minimize Redirects:

Webmaster often do URL Redirects using JavaScript or meta, sometimes just to point user from an old page to new page or to point user to the correct destination. Additional HTTP request is generated with each redirect. More redirects are there, the slower user reach to the desired destination.

Reduce DNS Lookups:

It takes around 20-120 milliseconds to resolve any hostname to its IP address, and browser is locked down until the process is completed.
It is recommended that there should be no more than 2-4 hostnames, that would reduce the DNS lookup time. Hence, web performance could be increased.

Optimization – The Assets (CSS, JavaScripts, Images)

Merge Multiple JavaScript into one:

Each JavaScript file is requested using a separate HTTP Request, which means the more JavaScript files, more will be the HTTP Requests. This can be reduced be reducing the number of files that are included on the webpage. This can be achieved by combining multiple JavaScript files into a single file. It will drastically reduce the HTTP requests which will ultimately decrease the site load time.

Compress JavaScript and CSS:

Compression of JavaScript and CSS files refers to the compression of content, mean removal of white spaces and comments which will reduce the file sizes and will be downloaded earlier resulting in decrease in site load time.

Customize Header Expiry/Caching:

By adding the expiry header for the files like images and static JavaScript and CSS files will skip the additional HTTP requests when the browser will load the page for second time, as they are already cached within the browser itself.

Handling Web Images:

Images are vital part of a webpage. If these images are not properly optimized in terms of filesize, it will consume a hell lot of bandwidth which will reduce results and will increase the site load time. There are certain recommendations which should be kept in mind while development and optimizing the website:

  • Use the right image extension (.jpg, .png, .gif etc) for different images. For example:
    If there are a lot of colors in the image; you should use JPEG format as you can adjust the compression level in your image editor. But if you require image background to be transparent and add some opacity to it, then you should use PNG images
  • Always use height and width for images while adding it to a webpage
  • Do not scale images

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch