fresh is a Node.js module for HTTP response freshness testing. It checks request and response headers to determine whether a resource is still fresh in a client cache, returning true or false (including handling Cache-Control: no-cache). It is useful in HTTP servers to decide whether to return 304 Not Modified or send the full response.
Project status
- Maintenance status: The upstream GitHub repo shows an upstream push on 2026-06-23, suggesting ongoing work, but the most recent version information in the provided update history is v2.0.0 on 2024-09-04, so published updates appear sparse relative to today.
- Update cadence (as evidenced): There is a long gap with no version updates shown between v2.0.0 (2024-09-04) and the last observed upstream activity (2026-06-23), indicating low release/update cadence even if development continues.
AI summary generated
Recent updates
v2.0.0
Release v2.0.0 does not include any publisher release notes. The provided diff shows repository and CI configuration changes, plus a version bump, rather than application/library source changes.
Breakingv1.0.0
v1.0.0 modernizes the project tooling (Node engine constraint, lint/test/coverage tooling, CI setup) and changes the core freshness evaluation logic for conditional requests. The functional change centers on correcting how If-None-Match interacts with If-Modified-Since.
Breakingv0.5.2
Release v0.5.2 was published on 2017-09-14, but the publisher provided no release notes. As a result, the upgrade impact (new features, bug fixes, breaking changes, or security updates) cannot be determined from the available documentation.
v0.5.1
v0.5.1 makes internal changes to how fresh() evaluates conditional headers, notably around date parsing and ETag matching. It also adds benchmark tooling and updates dev/CI configuration and dependencies, with no publisher release notes provided.
Featuresv0.5.0
This release updates the HTTP freshness calculation logic in `fresh(reqHeaders, resHeaders)` with corrected ETag semantics and more efficient header processing. Code changes focus on `If-None-Match` handling (including wildcard token behavior and weak ETag matching), and `If-Modified-Since` comparisons, with accompanying test and documentation updates.
v0.4.0
v0.4.0 is a small refactor of the `fresh` module with some performance-oriented cleanup (hoisted regexes, strict mode, minor logic tightening). The main behavioral change is a corrected interpretation of the `Cache-Control` header, specifically around handling `no-cache`. No release notes were provided in the publisher metadata for this version.
v0.3.0
This release (v0.3.0) updates the HTTP freshness logic in `fresh()` with improved `If-None-Match` handling, plus several contributor-focused changes (tests, CI, and dev tooling). The provided publisher release notes are missing, so the behavioral change needs to be inferred directly from the code diff.
Featuresv0.2.4
v0.2.4 makes primarily metadata and CI-related changes, adding Node.js 0.6 support via the package engine and Travis configuration. It also refreshes project documentation (adds README.md, removes Readme.md) and adjusts what files are published to npm.
BreakingFeaturesv0.2.3
Release v0.2.3 primarily updates package metadata, documentation, and the test/coverage and CI configuration. No runtime source code changes (for the exported fresh functionality) are shown in the provided diff.
v0.2.2
Release v0.2.2 was published, but no release notes or change details were provided by the publisher. As a result, this release cannot be assessed for new features, breaking changes, bug fixes, security, performance, or migration requirements based on the provided information.