Test for bfcache compatibility incorrectly flags use of no-cache
and max-age=0
#1825
Labels
[Plugin] Performance Lab
Issue relates to work in the Performance Lab Plugin only
[Type] Bug
An existing feature is broken
Milestone
The bfcache Site Health test (#1692 fixed via #1807) is currently checking for
no-cache
andmax-age=0
when in reality it shouldn't be.From Back/forward cache on Web.dev:
This article from Nitropack:
And in Monitoring bfcache blocking reasons on MDN, the only blocking reason for
Cache-Control
is theno-store
directive:And the Lighthouse audit strings:
https://github.com/GoogleChrome/lighthouse/blob/af88b935e3669601cef2d6adf7186a6624731446/core/lib/bf-cache-strings.js#L172-L175
https://github.com/GoogleChrome/lighthouse/blob/af88b935e3669601cef2d6adf7186a6624731446/core/lib/bf-cache-strings.js#L196-L200
Also, I tested serving pages with
Cache-Control: no-cache, max-age=0
and the DevTools check showed it was successfully served from bfcache:However, if I instead serve
Cache-Control: no-store
then I get a failure:So the
no-cache
andmax-age=0
checks should be removed from the test.The text was updated successfully, but these errors were encountered: