In the page structure there is the so-called header . In these rules are defined that, for example, regulate the exchange of information between browser and server or crawling by Google's algorithms. Since the rules for caching are also stored in headers, they play a central role in browser caching.
Commands in the caching header specify which resource or file may be cached . If no corresponding information is set, no caching takes place. A distinction is made between two caching headers: the Cache-Control header and the Expires header.
The Cache-Control header contains eu data information about which resource or file can be cached . The following instructions are common:
no-cache: The browser is allowed to cache, but must ask the server whether the respective resource is the latest version.
public: The resource may be stored in the cache.
private: The resource may be stored in the cache, but only by the browser and not by any existing proxy servers.
no-store: Caching the resource is not allowed.
While the Cache-Control header tells you which resources and files can be stored where, the Expires header is used to define time periods for caching . The recommendations from the previous section of this blog post can be implemented in this caching header: By specifying a time period in the Expires header, the browser knows from which point in time it should request a new copy of the respective resource or file from the server and temporarily store it in its cache.