What is an HTTP cache Validator ?

About

A validator is a value of an header that is used in a cache validation (conditional request) to see if the resource send has changed.

An header value is referred to as a validator when it is:

  • a resource metadata value
  • used within a precondition.

The standard validators are:

Additional validators that reflects resource state may be added and used by other extensions of HTTP, such as Web Distributed Authoring and Versioning.

Weak versus Strong

Validators come in two flavors: strong or weak.

Weak

Weak validators are easy to generate but are far less useful for resource comparisons.

Weak validation may also be used considers two versions of the document as identical if the content is logically equivalent.

For instance:

  • if the content is really the same but the modified time has been touched
  • or if the content has only slightly changed adding element that have no importance (such as a generation date)

Strong

Strong validators are ideal for comparisons but can be very difficult to generate. They should change if the resource has changed.

In a strong validation, if the content/metadata has slightly changed, the validation does not pass.

Documentation / Reference





Discover More
Etag - An unique identifier for a HTTP resource

The ETag HTTP response header is an identifier for a specific version of a resource. A etag comparison determines whether two representations of a resource are the same and is therefore similar to a hash...
Chrome Devtool Network 304
How to implement and check a Web / HTTP cache ?

Implementing and verifying that the HTTP cache is set and working properly is not a straightforward task. This article gives you a step by step.
What contains the HTTP Last-Modified header

The Last-Modified header is part of a conditional get request in order to get a resource if and only it has changed since the last fetch
What is a cache validation (conditional HTTP GET request) ?

A cache validation known as a conditional HTTP GET request asks the server if a resource has been modified



Share this page:
Follow us:
Task Runner