---
title: "How Pressidium Implements Browser Caching"
date: 2017-05-10
author: "Yorgos Fountis"
featured_image: "https://pressidium.com/wp-content/uploads/2017/05/Pressidium_blogpost_08_05_2017_Blog-post.png"
categories:
  - name: "Tutorials"
    url: "/blog/category/tutorials.md"
tags:
  - name: "wpcache"
    url: "/blog/tag/wpcache.md"
url: "https://pressidium.com/blog/pressidium-implements-browser-caching/"
---

# How Pressidium Implements Browser Caching

Previously,[ we delved into the browser cache](https://pressidium.com/blog/2017/browser-cache-work/) and explained the various cache-related headers you can use in order to optimise your website and make it snappier. The HTTP protocol has gone through several iterations; HTTP/1.0 and 1.1, with each of those implementing their own set of browser caching headers. For example, HTTP/1.0 used the Expires keyword along with the Pragma: no-cache directive to specify an exact “best by” date and to further instruct the browser not to cache anything if no caching is needed.

The different implementations, browsers, and server topologies can quickly make browser caching a daunting task, but this is where we enter the picture.

## Pressidium’s browser caching policy

We treat dynamic content differently from static content. Dynamic content is forced to be revalidated every time the browser requests it. This is only logical; if you cached dynamic content, then it wouldn’t be considered dynamic! This is implemented using the `must-revalidate, max-age=0` directives in `Cache-Control`. This forces the browser to ask the server if the copy it has in its cache is the most recent one. However, `max-age=0` forces the browser not to keep anything in its cache. These two directives effectively make sure that dynamic content is always fetched from the server, no matter what.

Cached static content, on the other hand (such as images, CSS files, JavaScript, etc), is configured to be good for 30 days.

Additionally, we use the `Expires` keyword strictly for backwards compatibility reasons; calculating its absolute value according to `Cache-Control`‘s `max-age` value. The `Expires` keyword takes an absolute value in the form of an expiration date, whereas the `Cache-Control: max-age=n` keyword specifies a relative value (n). This value specifies for how long the content can be considered fresh once it is cached.

HTTP/1.1 also introduced another header called `Etag` that works as a sort of “fingerprint” for content. Every content gets associated with an `Etag` value (which is generated by the web-server using a variety of ways). Whenever the content changes, the `Etag` value changes as well, thus signalling the need for the browser to get a fresh copy. `Etag` is used in Pressidium only for static files, and it is generated using the file’s modification time and size. This simply means that the web server generates a new `Etag` value every time the content is modified.

The implementation of a browser caching policy is something that you don’t need to fuss about if you’re a Pressidium client. Should you ever have questions related to browsing caching or experience any problems do not hesitate to contact us. We provide end-to-end support and we mean it.

 Start Your 14 Day Free Trial

 Try our award winning WordPress Hosting!

 [ START YOUR FREE TRIAL ](https://pressidium.com/free-trial/?utm_source=pressidiumcom&utm_medium=blog&utm_campaign=tutorials) [ VIEW OUR PRICE PLANS ](https://pressidium.com/plans/?utm_source=pressidiumcom&utm_medium=blog&utm_campaign=tutorials) 

 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/1.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/2.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/3.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/4.png) 

 ![](https://pressidium.com/wp-content/themes/pressidium-com/assets/pages/blog/partners/5.png)