What is Expires Headers ?

Expires headers are guide to browser from website that how long it can keep resources in it’s cache. Based on requirement of updating of any type of resources we can give different expiry time for resources. So Expire headers determine for browser that it needs to fetch new version of resources or use cached version.

Overview of Expires Headers
Expire headers
How Expires Headers Works

How Expires Headers works

By using Expires headers browser take decision to load resource from cache or directly from website server. Every time when website is loading on browser, browser check for expires headers for resources and if expiry date set to the future then cached version of resource at browser stored cache it will load resource from cache. Otherwise it will load direct from website server.

How Expires Headers Works

How Expires Headers works

By using Expires headers browser take decision to load resource from cache or directly from website server. Every time when website is loading on browser, browser check for expires headers for resources and if expiry date set to the future then cached version of resource at browser stored cache it will load resource from cache. Otherwise it will load direct from website server.

How Expires Headers Works
How Expires Headers Works

How to add Expires Headers ?

There are various ways of adding expires headers to website. Most common way of adding expires headers to website is adding them in web server configuration file. Other way is programatically changing expiry date of cache resources. In many CMS like WordPress have plugin solutions for adding expires headers.

How to Add Expires Headers
How to Add Expires Headers