Web - Cache

About

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

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 … HTTP/Web Cache - A step by step on how to configure and test a Web / HTTP cache

Chain

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.

Server

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, )

Intermediate / Proxy

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

Client

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.

Specifications

The HTTP cache specification is covered in this two specifications:


Powered by ComboStrap