- 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
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-storewith a timeout of 3 minutes: https://developer.chrome.com/docs/web-platform/bfcache-ccns