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
- The repository shows an upstream push as recently as 2026-06-01, which suggests ongoing maintenance, but the provided “recent updates” stop at 2024-09-04 so active changes since then are not evidenced here.
- Update cadence appears irregular, with major version updates clustered on 2024-09-04 (v1.0.0 and v2.0.0), and a much earlier update in 2017 (v0.5.2).
AI summary generated Today
Recent updates
v2.0.0
9/4/2024Release 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
9/4/2024v1.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
9/14/2017Release 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
9/12/2017v0.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
2/22/2017This 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
2/6/2017v0.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
5/12/2015This 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
9/8/2014v0.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
9/8/2014Release 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
2/19/2014Release 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.