Website OptimizationWordPress Optimization

Add Expires Headers

0

Overview

Expires headers let the browser know whether to serve a cached version of the page.

  • Reduce server load
  • Decrease page load time
  • Cost benefit ratio: high value
  • Access needed

What are expires headers

Expires headers tell the browser whether they should request a specific file from the server or whether they should grab it from the browser’s cache.

The whole idea behind Expires Headers is not only to reduce the load of downloads from the server (constantly downloading the same file when it’s unmodified is wasting precious load time) but rather to reduce the number of HTTP requests for the server.

When you visit a website your browser is responsible for communicating with the web server to download all the required files. It then compiles those files to display the web page. As web pages become richer in graphics and content, more and more files are being transferred between your machine and the web server.

In the past you would have an HTML file and maybe a few images to serve for your website, however many modern websites might have 50+ files per page to transfer. The files themselves can be a huge load increase by themselves but for each file you must create a request and even if requests are fractions of a second, they can soon add up.

How does it work?

Expires Headers are rather simple in how they work. They tell the browser how long to store a file in the cache so subsequent page views and visits they don’t have to download the file again. You are right to assume Expires Headers don’t improve page speed for a first time visit as this visitor would have to download all the files for the first time. Using Expires Headers helps decrease load times for returning visitors.

You can set Expires headers on specific files or even file types. Then when the browser comes to the website it can see when was the last time it downloaded the specific file types. If it was recently it will display them from the cache, if you haven’t visited the site in a while it will download the newest version from the web server.

The idea is to set late expiry times for items that don’t change on your website (logo, colours etc). Set short expiry times for things that change regularly.

Why is it important?

Adding Expires Headers is important to reduce HTTP requests which reduces the time it take for the server to communicate with the browser. It also allows your users to reuse the cache files that have been stored in the browser to reduce the amount of files they need to download.

How to Add Expires Headers

See PageSpeed’s Leverage browser caching recommendation for details.

RESOLUTION

Description

Plugin will improve your website loading speed by caching various types of static files in browser of User. It is light weight plugin but its impact on page loading speed in very crucial and easy noticeable.

ADVANTAGES

1) Reduce page loading time of website.

2) Improve user experience as page loads very quickly then before.

3) Decrease total data-size of page.

4) Have functionality to disable Etags which can have negative impacts on performance.

5) Along with expires headers plugin provide gzip compression which will help to speed-up your website by compressing the page output.

6) Larger band of predefined file types are covered so it will increase bandwidth of files which can have expiry headers.

DOCUMENTATION

For Plugin documentation, please refer our plugin website.

REQUIREMENTS

1) Make sure that the “mod_expires” module is enabled on your website hosting server.

2) It is necessary to have read/write permission of .htaccess file to plugin. If not then update file permissions accordingly.

USAGE

To use this plugin do the following:

1) Firstly activate Plugin.

2) Check “Enable Expires Headers” checkbox to enable plugin working.

3) Check Files type you want to have expires headers and also add respective expires days for type using input box.

4) Once you hit “save” button all options you selected in database of website and accordingly .htaccess file will updated and add expires headers for respective selected files.

Screenshots

FAQ

Contributors & Developers

“Add Expires Headers” is open source software. The following people have contributed to this plugin.

Contributors

 

 

Add Expires Headers

What We Can Learn About Marketing In 2020 From Leading Brands Leaving Amazon

Previous article

Do trade shows still matter in the age of online business? – TechCrunch

Next article

You may also like

Comments