# An old screen after Back: how page restoration differs from HTTP caching

> A restored page is different from a new HTTP response. Separate history navigation, live data checks, and authorization before treating an old screen as a deployment failure.

URL: https://lijiabao.dev/en/articles/bfcache-history-navigation-http-cache/ · lang: en · Edited by lijiabao.dev — not Li Jiabao's personal views · Published 2026-11-18
Other language: https://lijiabao.dev/articles/bfcache-history-navigation-http-cache/index.md

## An old screen after Back: how page restoration differs from HTTP caching

Edited by lijiabao.dev

Edited by lijiabao.dev · Published 2026-11-18

A restored page is different from a new HTTP response. Separate history navigation, live data checks, and authorization before treating an old screen as a deployment failure.

### What bfcache retains

A direct visit shows the new article, while the Back button brings an older screen into view. That difference deserves investigation before another deployment. A browser may use bfcache to restore a previously retained page rather than build a fresh document from a network response. Record the navigation that produced the result, then decide which part of the system needs evidence.

![A browser window with a return arrow and separate response cards illustrates restored page state.](https://lijiabao.dev/_astro/en-hero.QNACdx-P_2dTQRm.webp)

MDN distinguishes retained page state from a conventional cache of HTTP responses. An eligible document can be restored when the user navigates through history. The browser may therefore resume an existing page instead of repeating the original loading path. This is an optimization, not a promise that every Back navigation will use it. A fast transition alone does not identify the mechanism, and the discussion here describes an investigation method rather than a test already performed on a client’s site.

### Keep the navigation path in the report

Direct navigation, reload, and returning from another page are different observations. Write down the exact address, the starting page, and a recognizable piece of content. Language routes, redirects, and authentication state also belong in the comparison. If one observer reloads while another presses Back, calling both results a visit to the same URL hides an important difference. A useful report preserves the steps that another person can repeat with safe test data.

### Separate an old response from a restored screen

An outdated network response and a retained document that has not refreshed its data can produce a similar picture. Neither should be assumed from appearance alone. Application state and other browser features may also matter. Check whether a new request occurred, which response it produced, and whether the deployed build actually contained the change. That last check prevents an investigation from blaming caching for content that never reached the release in the first place.

### Observe the page-show event deliberately

The pageshow event provides an observation point when a page is shown, including initial loading and history traversal. MDN documents its persisted flag for retained-page restoration. Instrument a suitable test environment and compare the event with the navigation steps; do not paste unexplained monitoring into a production customer page. An event value describes part of the lifecycle. It does not by itself verify the identity, freshness, or authorization of every item displayed by the application.

### After bfcache restoration, choose what needs refreshing

A reservation slot and an explanatory article do not necessarily need the same freshness policy after bfcache restoration. Define the acceptable age and consequence of stale data before choosing an update strategy. For an illustrative booking interface, a useful design question is whether availability should be rechecked before a user acts on it. That is a requirement to evaluate, not a claim that this site runs such a system. Avoid an automatic full reload merely because it makes the observed difference disappear; it may also discard useful context.

### Treat logout and server authorization separately

Use a non-sensitive test account to examine what appears after logout and a return to the earlier page. Also check the server’s response to subsequent protected requests. A blank screen does not prove that every authorization rule works, while an old screen does not, on its own, prove that the server still grants access. Visible sensitive information deserves its own handling. The display policy, request authorization, and storage choices need coordinated review rather than a single header offered as a complete security solution.

### State the browser and test conditions

Chrome DevTools includes a dedicated inspection workflow for history-cache restoration and reasons a page may not qualify. Interfaces and eligibility rules can change, so use current guidance for the browser under examination. Record the version, page, and result rather than treating one successful check as a guarantee for all devices. If a feature prevents restoration, first understand its purpose. Removing functional behavior just to obtain a successful diagnostic result can trade a visible test failure for a less obvious application problem.

### Deliver a repeatable comparison

Report the distinctive content seen after each navigation, the request evidence available, the lifecycle observation, and the data that was or was not refreshed. Keep deployment verification alongside this evidence so the two questions remain connected. Avoid real purchases or repeated customer submissions when testing navigation. A targeted change should be checked using the same conditions that exposed the issue. When evidence is missing, retain that limit instead of describing a refreshed screen as proof that every user now sees the same version.

Investigating bfcache begins with how the user returned to the page. Once that path is clear, deployment evidence, HTTP responses, and live application state can be checked at the right level without repeatedly publishing an article that is already live.

Related reading: [no-cache does not mean no storage: tracing stale browser and CDN responses](https://lijiabao.dev/en/articles/cache-control-no-cache-browser-cdn-revalidation/); [Choosing 301, 302, 307, or 308: methods and caching](https://lijiabao.dev/en/articles/http-redirect-status-method-and-cache/)

### Sources

1. [web.dev：往返快取的原理與生命週期](https://web.dev/articles/bfcache?hl=en) web.dev
2. [MDN：pageshow 事件](https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event) developer.mozilla.org
3. [Chrome DevTools：往返快取檢查](https://developer.chrome.com/docs/devtools/application/back-forward-cache) developer.chrome.com
4. [MDN：往返快取名詞說明](https://developer.mozilla.org/en-US/docs/Glossary/bfcache) developer.mozilla.org

[All articles](https://lijiabao.dev/en/articles/) [以中文閱讀這一篇](https://lijiabao.dev/articles/bfcache-history-navigation-http-cache/)
