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

Cached files are removed after 19 days.

Important

Cached publiclink.requested events are not included in the reporting logs.

Response headers

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

Header

Description

accept-ranges

Marker 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-control

Directives 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-disposition

A header indicating whether the content is expected to be displayed inline in the browser, or as an attachment, downloaded aas an attachment.

content-length

Size of the entity-body, in bytes, sent to the recipient.

content-type

Media type of the resource. In responses, a Content-Type header tells you the type of the returned content.

date

Contains the date and time at which the message originated.

etag

Identifies the version of the resource. If you already have the latest version, you requests for newer versions are smaller, reducing unnecessary bandwidth usage.

last-modified

Contains 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-options

Used 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:

RequestResponse
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. If the two tags do not match, the resource has changed, so the server returns the new version of the resource and creates an audit log. If the resource has not changed, the server returns a 304 Not Modified response, telling the requester that their cached version of the resource is still current.

Important

If more than one request is made within a 600 second period, the cached version of the resource is returned with no additional checks made by the server.

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:

Value

Description

public

Specifies that the response can be cached by the content delivery network (CDN), the browser, or any other proxy.

must-revalidate

Indicates 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.

Do you have some feedback for us?

If you have suggestions for improving this article,