Achieve — High Level Logic Project. Creating a new meta design pattern.

Friendly in development. Fast in production. Just build your apps. Let Achieve do the rest.

← Back to documentation index

Achieve RFC 9110 §8.8.3 ETag

Created November 4, 2026 · Updated November 6, 2026 · Achieve 3.1.0 · Qualified runtime: Node.js 24.22.2

Requirement Level: SHOULD

Achieve 3.1.0 is a Node.js HTTP application server that supplies strong entity tags for selected static and media representations when caching is enabled or an entity-tag precondition requires a validator. The tag describes the representation selected for the response, not merely its request URL.

Applicable requirements

RFC 9110 §8.8.1 defines a strong validator as representation metadata that changes whenever an observable change occurs in the representation data. §8.8.3 defines an entity tag as an opaque quoted validator. A tag whose generation does not satisfy strong-validator characteristics must carry the W/ weakness indicator.

The RFC says an origin server SHOULD send an ETag when representation changes can be determined reasonably and consistently. Its generation guidance in §8.8.3.1 recognizes internal revision values, content hashes, combinations of file attributes, and sub-second modification times as possible strategies. Achieve uses file attributes so validation does not require reading or hashing the complete resource on every request.

Content coding changes representation data. The content-negotiation example in §8.8.3.3 explains why a strong tag for a content-encoded representation has to differ from the unencoded form.

Achieve's strong validator

Achieve obtains metadata from the open file selected for transmission. It combines these values in order:

  1. modification time in milliseconds;
  2. filesystem change time in milliseconds;
  3. representation size;
  4. filesystem device identifier;
  5. filesystem file identifier or inode;
  6. the running Node.js and Achieve versions.

The colon-separated metadata is encoded with base64url. Achieve appends a representation marker and encloses the result in double quotes without a weak-validator prefix.

"base64url(metadata)-i"   identity
"base64url(metadata)-g"   gzip
"base64url(metadata)-d"   deflate

The marker keeps identity, gzip, and deflate validators distinct even when they originate from the same source resource. Metadata for a compressed response describes the selected compressed artifact. A Node.js or Achieve version change can also invalidate a tag without a resource-byte change; a strong validator is permitted to change more often than the representation data.

For evaluation of validator preconditions, see Achieve RFC 9110 §13 Conditional Requests.

Automated verification

The verifier suite checks that an unchanged representation retains its tag; identity, gzip, and deflate have distinct strong tags; and size and sub-second metadata participate in the result. Focused cases cover same-size edits with restored modification times, timestamp-preserving file replacement, changed compressed sources, and reuse of unchanged compressed artifacts.

Descriptor tests verify that metadata and transmission use the same opened representation. Compression tests verify that obsolete gzip or deflate output is rejected when source metadata changes during background generation.

See Achieve HTTP conformance testing for the stable test-suite entry point and execution guidance.

Limitations

The validator is metadata-based, not a cryptographic digest of the representation bytes. Its strength depends on the filesystem reporting a distinguishing change in at least one participating attribute. Deliberate restoration or collision of all participating metadata, filesystem behavior that does not expose a relevant change, or reuse of file identity values can theoretically produce the same tag for different bytes.

Change time and file identity materially reduce collisions caused by same-size edits, restored modification times, and file replacement, but do not provide a mathematical content-identity guarantee. The metadata strategy uses information already obtained for the selected open representation and avoids an additional full-file read and hash on each validation request.