Back

Caching Policy

What is caching ?

Caching is an action of the browser, at the request of the WEB server, which consists in saving a static resource (image, CSS style, script, etc.) on the user's computer so that he no longer has to load it when this same resource is needed on another page of the site, or during another visit to the same page. For example, on every page of a site, there is a logo, its caching allows to free the user from the loading necessary to retrieve it at each page visited during his navigation on the site.

Why is it important ?

The fact that static resources are cached improves the loading time on the user's repeated visits, because the browser no longer has to load them. Caching therefore contributes to the speed of the site by speeding up navigation. Only the first loading of the page will be complete and will require the transfer of all resources.

How do I set it up ?

The caching instruction of a resource is located at the level of the HTTP header "Cache-Control" returned by the WEB server. This HTTP header informs the browser that it is necessary to save this resource, and informs it of the delay in seconds for which it must keep it thanks to the "max-age" instruction.

Cache-Control: max-age=31536000

Caching is generally done at the level of the WEB server that takes care of this management. In order to provide a maximum user experience, it is recommended to use a minimum of 97 days.