logo
logo

Public links caching

In computing, a cache is a high-speed data layer that stores a subset of data, usually temporarily in nature, so that future requests for that data can be processed faster than accessing the primary storage location of the data. This lets you to efficiently reuse previously retrieved or computed data.

Note

The cached files are removed after 19 days.

Response headers

When requesting a public link, the returned response contains the following headers:

HeaderDescription
accept-rangesMarker used by the server to advertise its support of partial requests. The value of this field includes which units can be used to define a range.
cache-controlDirectives or instructions for caching in requests and responses. The fact a particular directive is in a request does not mean it must also be in the resulting response.
content-dispositionA header indicating whether the content is expected to be displayed inline in the browser, or as an attachment, downloaded aas an attachment.
content-lengthSize of the entity-body, in bytes, sent to the recipient.
content-typeMedia type of the resource. In responses, a Content-Type header tells you the type of the returned content.
dateContains the date and time at which the message originated.
etagIdentifies the version of the resource. If you already have the latest version, you requests for newer versions are smaller, reducing unnecessary bandwidth usage.
last-modifiedContains the date and time at which the origin server believes the resource was last modified. Used to determine if a resource received or stored is the same. Less accurate than the etag header, it is used as a fallback mechanism.
x-frame-optionsUsed to indicate whether a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object> tag.

The following image shows an example of the returned headers for a public link:

ETag

The ETag or entity tag is one of several mechanisms that HTTP provides for cache validation, which lets you make conditional requests.

ETags tell a web server whether the requester already has the latest version, saving bandwidth by not re-sending the response in full.

An ETag is an opaque identifier assigned by a Web server to a specific version of a resource found at a URL. If the resource representation at that URL changes, a new ETag is assigned.

When a browser receives an ETag in the header of a resource, it stores it. The next time the browser requests that resource, it includes the stored ETag in an If-None-Match header field.

The syntax of an If-None-Match tag is:

If-None-Match: "<etag_value>"

The ETag value is a string of ASCII characters placed between double quotes, for example "0x8D8BC7C6A3BCDCF".

The web server compares the received ETag with that of the requested resource, and only returns that resource if the two tags do not match. If they do match, the resource has not changed, and so the server returns a 304 Not Modified response,telling the requester that their cached version of the resource is still current.

For more information about the ETag header, see ETag.

Cache-control

Public links are always returned with the cache-control header containing the following values:

ValueDescription
publicSpecifies that the response can be cached by the content delivery network (CDN), the browser, or any other proxy.
must-revalidateIndicates that once a resource becomes stale, caches must not use their stale copy without successful validation on the origin server.
max-age=<seconds>The time, in seconds, after which the cached copy of the resource will stop being fresh, and become stale. After a resource expires, a browser must request a new version from the server.

Can we improve this article ? Provide feedback