Web - Cache


This article is talking about cache in the Web which is a feature of HTTP that:

Cache Implementation Step by Step

The how-to page gives a step-by-step idea of how to configure and test the HTTP cache.

More … How to implement and check a Web / HTTP cache ?


There is three component in the route of an HTTP request/response, mainly:

Each below section is talking about this process related to the cache.


A web server does not cache any resource (the application on the server may cache) but controls how the resources (HTML, Javascript, …) that it send are cached via the several control cache Header.

The client (browser) and proxy will read this control cache Headers and implements their cache accordingly.

To understand and see the cache headers that have an impact on the cache, see this article: HTTP - Cache (Cache-Control Header, Bursting, )

Note that by pre-rendering a page, you may also implement an internal cache

Intermediate / Proxy

On the network, you can have proxy that may have their own cache store.


Browser cache

The web browser cache will also read the control cache headers and implements its cache accordingly.

Service workers

If for many reason such as:

  • disk space limitations,
  • browser internal implementation,
  • and limitations in the expressiveness of the HTTP cache specification (ie control cache headers)

the browser cache may not fulfill your requirement, you can always implements your own cache strategy with service worker for instance.


The HTTP cache specification is covered in this two specifications:

Task Runner