Expires Headers

What Are Expires Headers?

Expires Headers tells the browser how long they should store a file for in the cache. Should the browser grab a file from the cache or request it from the server? The idea of expires headers is to reduce the load time of downloads from the server and reduce the number of HTTP requests for the server. This helps with the speed and performance of the page and lowers bandwidth use. When a visitor lands on your landing page, their browser must communicate with the server to download all the required files that they need to navigate your page properly. The more content and media that is added, the more time is needed for files to be transferred over.

Nowadays, websites might need 50+ files per page to transfer. These files can be small or large depending on how optimized your page is. However, it is important to not disregard small files as they can start to build up.

How Do Expires Headers Work?

Expires Headers on specific files and file types are under your control. When a visitor comes to the website, Expires Headers will check when the file was last downloaded, and if it was recent then it will display them from the cache. However, if it wasn't then it will download the newest version from the server. Items that don't change frequently or at all such as your logo can have late expiry times. But for items that change regularly, it is recommended to set short expiry times.

The skeleton of your Expires Headers should look something like this:

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"

An example of Expires Headers in your file looks similar to this:

# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"

Speak with an optimization specialist about this strategy. Expired headers fit into an overall optimization and caching strategies. Connect with a Specialist at Digital Shift to have your questions answered. Be certain to follow us on social media and to check out our other digital marketing terms and examples!

Your Path to Success Could Be One Phone Call Away With a Local Marketing Expert
During your 15-minute exploratory chat, there's nothing to buy, but you can share your story about what's going on with your local marketing. We'll share with you what's working, see if and how we may be able to help and answer all of your local search engine optimization questions.
Secure Your Session in One of Our Limited Time Slots
Yes, I Want To book a Free Call Now
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram