Skip to content

prerender-v0.97.1 — @harperfast/prerender

Choose a tag to compare

@harper-joseph harper-joseph released this 30 Sep 16:26
886fbef

@harperfast/prerender 0.97.1

A snapshot's own validators are opt-in: page.snapshotValidators, default false. (#227)

  • Default (false): a rendered page (a cache serve, a peer rescue, a render-now result) carries no ETag and no Last-Modified, so a conditional request never gets a 304 from a snapshot.
  • true: 0.97.0's behaviour. The snapshot carries ETag: W/"<lastCachedMs>-<deviceType>" and Last-Modified = its render time, and a crawler holding the current render gets a 304 from the cache.
  • Unchanged from 0.97.0: a snapshot never carries the origin document's ETag / Last-Modified. Raw-cache documents and proxied responses keep the origin's validators.

Why: 0.97.0 gave every snapshot validators of its own. On a site whose origin sends none, that is the first time crawlers get validators from this cache, so they start revalidating and it starts answering 304s. That is a change to what crawlers receive, to make and measure per site (response_304 beside bot_serve), not a side effect of an upgrade.

Upgrading from 0.97.0: set page.snapshotValidators: true to keep 0.97.0's behaviour. It is a live option; no restart needed.

1,816/1,816 plugin tests. Console unchanged (0.22.0).