Skip to content

Policy for "Back/Forward Cache" (aka "bfcache" or "Page Cache") #16359

Open
@jugglinmike

Description

Firefox and Safari implement a cache which drastically alters the behavior of history.back and history.forward. Chrome is experimenting with a similar feature.

The optimized behavior is at odds with at least one test in WPT: websockets/unload-a-document/002.html (latest results from wpt.fyi). It's difficult to say how many more tests are affected by this. There appears to be just 80 references to history.back and history.forward, and that may be a fair upper bound.

Judging only from the issues where "bfcache" has been mentioned, it seems as though we're willing to accept tests concerning this behavior as long as they do not fail in non-supporting browsers. I can't find any discussion about the policy itself, hence this issue.

It doesn't seem like we can support this optionally since contributors need to know what will happen if they invoke history.back in a test.

If we assume it is present, we'll need to update the relevant tests and instruct authors to circumvent the behavior when it's unwanted. If we assume it is absent, we should include instructions/automation on disabling it whenever possible. In either case, we should make mention of this in the documentation on the infrastructure's assumptions.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions