back-forward-cache
/back-forward-cache
Use when reviewing navigation performance, browser lifecycle events, or resume-from-memory behavior. Check the actual browser lifecycle and restore path, not only static code patterns.
- Author
- thedaviddias ↗
- Repository
- front-end-checklist ↗
- Licence
- MIT
- Last repository change
- 06.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when reviewing navigation performance, browser lifecycle events, or resume-from-memory behavior. Check the actual browser lifecycle and restore path, not only static code patterns.
Original author description
Use when reviewing navigation performance, browser lifecycle events, or resume-from-memory behavior. Check the actual browser lifecycle and restore path, not only static code patterns.
How it works
- Quick Reference
- Check
- Fix
- Explain
- Code Review
SKILL.md preview
--- name: back-forward-cache description: "Use when reviewing navigation performance, browser lifecycle events, or resume-from-memory behavior. Check the actual browser lifecycle and restore path, not only static code patterns." metadata: category: performance priority: high difficulty: advanced estimatedTime: "25" source: frontendchecklist.io url: https://frontendchecklist.io/rules/performance/back-forward-cache --- # Optimize pages for back/forward cache Back/forward cache turns many browser back and forward navigations into near-instant restores because the entire page is resumed from memory instead of being rebuilt from the network. Losing bfcache eligibility makes common navigations feel far slower than they need to. ## Quick Reference - Never add an `unload` listener - it is the most common bfcache blocker - Use `pagehide` and `pageshow` instead of assuming every navigation reloads - Refresh time-sensitive state when `pageshow.persisted` is `true` - Keep `beforeunload` conditional and remove it when there are no unsaved changes - Verify eligibility in DevTools instead of assuming a page is cacheable ## Check Review this route for back/forward cache blockers. Search for unload or unconditional beforeunload listeners, state that assumes every navigation is a full reload, and resource lifecycles that break when the page is resumed from memory. ## Fix Replace unload logic with pagehide and pageshow handlers, remove unnecessary blockers, and refresh only the time-sensitive state that must change after a bfcache restore. ## Explain Explain how the back/forward cache differs from HTTP caching, why unload blocks it, and how pageshow/pagehide should be used instead. ## Code Review Review route code, global listeners, analytics hooks, and data-refresh logic related to Optimize pages for back/forward cache. Flag exact listeners, APIs, or lifecycle assumptions that prevent a restore or leave stale state after a restore. --- For full implementation details, code examples, and framework-specific guidance, see `references/rule.md`. Rule page: https://frontendchecklist.io/rules/performance/back-forward-cache
Files in this package (2)
- SKILL.md 2 KB
- references/rule.md 5 KB
Versions
The database has no other skills named back-forward-cache.
Database snapshot: 13.11.2026 · package version 6eb88fa878f5 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90browser-automation-stinger
Playwright and Puppeteer automation for deterministic browser tests, debugging, downloads, screenshots, and browser lifecycle control. Use for browser automation work. - 90salesforce-lwc
Use when working on Lightning Web Components — wire adapters, events, lifecycle, state, performance, testing. - 100maui-app-lifecycle
.NET MAUI app lifecycle guidance — the four app states, cross-platform Window lifecycle events (Created, Activated, Deactivated, Stopped, Resumed, Destroying), platform-specific lifecycle mapping, backgrounding and resume behavior, and state-preservation patterns. USE FOR: "app… - 90esp32-flash-cache-disabled-path
Use when designing, reviewing, debugging or validating flash cache disabled path for ESP32 firmware; apply target-specific constraints, failure analysis and measurable verification before release. - 100maui-app-lifecycle
.NET MAUI app lifecycle guidance covering the four app states (not running, running, deactivated, stopped), cross-platform Window lifecycle events, backgrounding and resume behaviour, platform-specific lifecycle mapping for Android and iOS/Mac Catalyst, and state-preservation… - 100immutable-patterns
Use when reviewing scripts, client components, bundles, or runtime behavior related to Prefer immutable data patterns. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.