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


Powered by ComboStrap