Skip to content

CacheControlFilter headers stopped working since Chrome 136 #897

@BalusC

Description

@BalusC
  • Configure CacheControlFilter with no-cache on FacesServlet
  • Have 2 pages which link to each other and have submit forms referencing their own backing bean, which can be @ViewScoped
  • In Chrome 136 or newer, open first page, then click link to second page, then hit browser back button, then submit form in first page --> this unexpectedly throws ViewExpiredException. When using OmniFaces @ViewScoped, this exception has the message "View %s was already unloaded".

According to Network in DevTools it turns out that the back button is not anymore firing a hard request to server but is instead serving from browser cache.

Upon checking bug reports it turns out that since Chrome 136 the so-called back-forward cache (BFCache) is permanently enabled even for pages with Cache-Control: no-store with a timeout of 3 minutes: https://developer.chrome.com/docs/web-platform/bfcache-ccns

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions