back-forward-cache

back-forward-cache is a skill for Claude Code, Codex from thedaviddias/Front-End-Checklist. It costs 35 tokens per session (444 once invoked), scanned A, original, MIT.

A browser-performance review guide for navigation and pages restored from the browser's memory. The back-forward cache lets a browser bring a previous page back quickly without loading it again.

In plain words
What is it for?
Use it when reviewing navigation, browser lifecycle events, and resume behavior after moving backward or forward.
Why use it?
It helps find navigation problems that appear when a page is saved and restored, such as incorrect state or lifecycle handling. It checks the browser's actual restore process, not just static code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when reviewing navigation, browser lifecycle events, and resume behavior after moving backward or forward.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thedaviddias/front-end-checklist/back-forward-cache
About the project

Front-End Checklist is a collection of front-end web development rules organized as a practical review and quality workflow for people and AI agents. Developers use it to audit projects and pull requests, check implementation details, and find guidance for remediation and verification. The catalogue entries provide skills, instructions, MCP tools, and a plugin for using the checklist in agent workflows.

thedaviddias/Front-End-Checklist · 74,876 stars · on GitHub · frontendchecklist.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thedaviddias/Front-End-Checklist --skill back-forward-cache
Clone the repo
git clone --depth 1 https://github.com/thedaviddias/Front-End-Checklist

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for back-forward-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/thedaviddias/front-end-checklist/back-forward-cache/github.svg)](https://agentmods.dev/skills/thedaviddias/front-end-checklist/back-forward-cache)
Your own site
<a href="https://agentmods.dev/skills/thedaviddias/front-end-checklist/back-forward-cache"><img src="https://agentmods.dev/badge/skills/thedaviddias/front-end-checklist/back-forward-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for back-forward-cache

Your own site · 80×15
<a href="https://agentmods.dev/skills/thedaviddias/front-end-checklist/back-forward-cache"><img src="https://agentmods.dev/badge/skills/thedaviddias/front-end-checklist/back-forward-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 444 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00444
Opus 5.5 $0.00014 $0.00178
Sonnet 5.5 $0.00007 $0.00089
Haiku 4.5 $0.00003 $0.00044

Measured 1mo ago against content hash 33adfc648e13, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

back-forward-cache scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/back-forward-cache/SKILL.md · 47 lines

What it actually says

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

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed 33adfc648e13
  2. 3mo ago First seen · 47 lines · 35 tokens per session scan A 4d6361da2e7e

Subscribe to this mod's changes

back-forward-cache is a skill published in the GitHub repository thedaviddias/Front-End-Checklist (74,876 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 444 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

back-forward-cache compared with skills from other repositories

back-forward-cache next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
back-forward-cachethedaviddias/Front-End-ChecklistSkill75k1mo agoMITA35Claude Code, Codex
fallback-and-resilienceborski/travel-hacking-toolkitSkill1.1k6d agoMITA43Claude Code
browser-fingerprintingbytesagain/ai-skillsSkill167mo agononeA36Claude Code, Codex
webapp-testingamir0135/github-copilot-use-casesSkill23mo agoMITA35Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k5d agoMITA52Claude Code, Codex
azure-messaging-webpubsub-javamicrosoft/skillsSkill3.3k3d agoMITA43Claude Code
browser-skillzeenie-ai/OpenCompanySkill1.1k3d agoMITA53Claude Code