Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/keywork/http/headers/mod.ts>Conditionals

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Go to Latest
interface Conditionals
import { type Conditionals } from "https://deno.land/x/keywork@v6.0.1/http/headers/mod.ts";

Properties

Last-Modified: string

The last modification date of the resource, used to compare several versions of the same resource. It is less accurate than "ETag", but easier to calculate in some environments. Conditional requests using "If-Modified-Since" and "If-Unmodified-Since" use this value to change the behavior of the request.

ETag: string

A unique string identifying the version of the resource. Conditional requests using "If-Match" and "If-None-Match" use this value to change the behavior of the request.

If-Match: string

Makes the request conditional, and applies the method only if the stored resource matches one of the given ETags.

If-None-Match: string

Makes the request conditional, and applies the method only if the stored resource doesn't match any of the given ETags. This is used to update caches (for safe requests), or to prevent uploading a new resource when one already exists.

If-Modified-Since: string

Makes the request conditional, and expects the resource to be transmitted only if it has been modified after the given date. This is used to transmit data only when the cache is out of date.

If-Unmodified-Since: string

Makes the request conditional, and expects the resource to be transmitted only if it has not been modified after the given date. This ensures the coherence of a new fragment of a specific range with previous ones, or to implement an optimistic concurrency control system when modifying existing documents.

Vary: string

Determines how to match request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.