Web - Cache


This article is talking about cache in the Web.

The web is a term that groups several applications. There is basically three:

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



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

The client (browser) and proxy will read this 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, )

Proxy cache

Proxy caches resource by reading only the following Cache-Control headers:

  • max-age,
  • s-maxage,
  • and private

The others headers will not influence proxy caching.


Browser cache

The web browser cache will also read the 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 headers cache,

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

Powered by ComboStrap