Bloom Filters: The Cheap Gate Before the Expensive Question
A Bloom filter is a small bit array plus a few hash functions that answers "has this been seen?" with no false negatives and a false-positive rate you choose up front.
SentryAbdelrahman AwadAnnouncement
The back/forward cache (bfcache) allows instant page restores by freezing snapshots, yet its hits register no events in traditional telemetry, creating a blind spot for teams. Sentry’s bfcacheMetricsIntegration fills this gap by modeling three browser-provided signals as application metrics: a navigation counter with hit/miss outcome, a per-reason counter for misses via the notRestoredReasons API, and a distribution of fallback reload duration. The integration is opt-in and launched in JavaScript SDKs v11; detailed miss reasons are currently Chromium-only due to browser API support. Users can query these metrics to break down bfcache health by route, release, or browser, enabling discovery of regressions caused by unload listeners, cache-control headers, or third-party scripts. This turns the bfcache from an invisible performance feature into a measurable, trackable signal that teams can monitor and improve.
The back/forward cache (bfcache) lets browsers instantly restore pages on back/forward navigations, but its hits produce no page-load events, making them invisible to standard performance tools. Teams cannot measure bfcache health because success is silent, while regressions from browser heuristics, unload listeners, or cache-control headers go undetected. This blind spot is especially damaging for high-frequency navigation flows in ecommerce, search, documentation, and media browsing. Sentry’s existing tools relied on the page-load lifecycle, so bfcache restores were never recorded. The bfcacheMetricsIntegration was built to expose this gap by turning browser bfcache signals into measurable application metrics.
The bfcacheMetricsIntegration models three browser signals as application metrics: browser.bfcache.navigation (counter with hit/miss outcome), browser.bfcache.not_restored (counter per not-restored reason, Chromium-only), and browser.bfcache.reload.duration (distribution of fallback reload time in milliseconds). It leverages the pageshow event and notRestoredReasons API. Users enable it with a one-liner: Sentry.bfcacheMetricsIntegration(). The integration is opt-in and shipped in JavaScript SDKs v11. Teams query the metrics to break down health by route, release, or browser, and build custom dashboards using agentic dashboard creation.
The bfcacheMetricsIntegration captures three signals: navigation outcome (hit/miss), not-restored reasons (Chromium-only), and the duration of fallback reloads on a miss, enabling teams to measure bfcache health.
Traditional performance tools miss bfcache hits because restored pages fire no pageload event; this integration fills that gap by using the pageshow event and notRestoredReasons API.
Bfcache eligibility can regress due to unload listeners, Cache-Control: no-store headers, open connections, or third-party scripts; the integration makes these detectable without code changes or redeploys.
Add Sentry.bfcacheMetricsIntegration() to the integrations array in Sentry.init(). The integration is opt-in and available in JavaScript SDKs v11. It then emits application metrics for back/forward navigations.
Detailed not-restored reasons are currently Chromium-only, as they depend on the notRestoredReasons API. Hit/miss outcomes work across modern browsers. Coverage will widen as other engines ship the API.
It emits three application metrics: browser.bfcache.navigation (counter with hit/miss outcome), browser.bfcache.not_restored (counter per reason, Chromium-only), and browser.bfcache.reload.duration (distribution of fallback reload time in milliseconds). These carry attributes like reason, frame, and outcome.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
A Bloom filter is a small bit array plus a few hash functions that answers "has this been seen?" with no false negatives and a false-positive rate you choose up front.
bfcache freezes page snapshots for instant back/forward navigation, but unload listeners, cache headers, or third-party scripts can silently disable it. This explainer maps the trade-offs and the metrics that reveal them.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.