Skip to content

Releases: HarperFast/prerender-plugin

v1.3.0

Choose a tag to compare

@harper-joseph harper-joseph released this 30 Jun 19:07
709be32

@harperfast/prerender-browser v1.3.0

Configurable hydration capture for JS-heavy sites (Bazaarvoice reviews, Curalate UGC,
Slick carousels). All new options are opt-in — defaults reproduce prior behavior, so
existing deployments render exactly as before.

New config options

Navigation / wait

  • navigation.domStableMs / domStableTimeoutMs / domStablePollMs / domStableTolerance
    wait until the (shadow-aware) DOM element count holds steady instead of relying solely on
    network-idle. Reliable "content is done" signal for widgets that begin loading after a
    network lull. domStableMs: 0 (default) disables it.

Scroll

  • scroll.settleUntilStable + scroll.settleStablePasses — loop full scroll-passes (with a
    network-idle wait between each) until the DOM stops changing, instead of a single
    scroll-to-bottom. Keeps IntersectionObserver-lazy widgets in view long enough to finish
    loading (review lists, UGC carousels) before the snapshot. Bounded by domStableTimeoutMs.

Resource blocking

  • block.stubImages — answer blocked image requests with a 1×1 transparent GIF (HTTP 200)
    instead of aborting. Lazy-loaders that fall back to a placeholder on load error (e.g.
    Slick) keep their real src URLs, so the serialized HTML retains real image URLs and shows
    no broken-image placeholders — at ~43 bytes per image.

Post-processing

  • postProcess.resolveLazyImages — copy a real URL from data-lazy / data-src /
    data-original / srcset into src for images that never received one (off-screen
    carousel/grid slides), so they load when the page is served.
  • postProcess.flattenShadowDom — inline open shadow roots into the light DOM (with
    host-scoped CSSOM/:host rule rewriting) so content rendered in shadow DOM — which
    outerHTML omits — is serialized, without the shadow's CSS leaking onto the rest of the page.
  • postProcess.stripBlockedResources — remove resource elements (img/iframe/script/…) whose
    URL matches a block.urlPatterns entry from the serialized output, so ad/RUM/analytics
    pixels don't fire (or error) when the cached page is loaded.

Notes

  • No breaking changes. 15/15 existing tests pass.
  • dist/ is built at release time (gitignored); the tarball workflow runs npm run build.

@harperfast/prerender v0.2.0

Choose a tag to compare

@harper-joseph harper-joseph released this 30 Jun 21:13
50b5313

@harperfast/prerender v0.2.0

Origin staging passthrough

A new staging option to verify an origin against a staging edge (e.g. the Akamai staging network)
through the plugin, without changing the URL, the Host, or the cache:

'@harperfast/prerender':
  staging:
    ip: '' # staging edge IP; empty = disabled
    header: x-harper-staging # request header whose presence toggles staging passthrough
  • When staging.ip is set, a cache-miss origin fetch that carries the staging.header request
    header is connected to that IP instead of the public origin. Only the TCP connect address is pinned
    (via an undici Agent connect.lookup) — the Host header, TLS SNI, and certificate validation stay
    the real origin host, so the staging edge serves the right property and a valid cert.
  • The header is a toggle, not a target — the address is always the configured staging.ip, never a
    value from the request, so a request can't repoint the fetch at an arbitrary host.
  • Cache hits are unaffected — the header isn't part of the cache key, so cached pages are served as-is;
    only the live origin fetch on a miss is redirected.
  • With the debugHeader present, a staging-served response is tagged x-harper-origin: staging.
  • Off by default; production is unaffected unless staging.ip is configured.

Also

  • Fixed a stray NUL byte in upstream.js (a memoization-key separator) that made git treat the file as
    binary; added .gitattributes so source files always diff as text.

No breaking changes. 63/63 tests pass.

Tarball: harperfast-prerender-0.2.0.tgz (this release also bundles harperfast-prerender-browser-1.3.0.tgz, unchanged from v1.3.0).

v0.1.0

Choose a tag to compare

@harper-joseph harper-joseph released this 24 Jun 21:28

First tagged release of the configurable Harper Prerender system.

  • @harperfast/prerender (plugin): configurable forwarded/CDN ingress (Akamai), per-route query policy, env-sourced securityToken, native-lock mutex.
  • @harperfast/prerender-browser (render library): env-agnostic library configured via startWorker() options, custom-renderer support, deep-partial rendering config.

The plugin is a monorepo subpackage (npm can't install a git subdirectory), so it's attached here as a tarball. Reference it as:
"@harperfast/prerender": "https://github.com/HarperFast/prerender-plugin/releases/download/v0.1.0/harperfast-prerender-0.1.0.tgz"