Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
BBC RussianHomePhabricator
Log In
Maniphest T341471

A 'cache-control' header contains directives with invalid values: 'stale-while-revalidate=60'
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
An error/warning is reported by the browser in the Performance section :

A 'cache-control' header contains directives with invalid values: 'stale-while-revalidate=60'
Affected ressource : Cache-Control: public, max-age=300, s-maxage=300, stale-while-revalidate=60
How to Fix the Problem : https://webhint.io/docs/user-guide/hints/hint-http-cache/

What should have happened instead?:
Nothing. The browser should not report any bugs.

Software version (skip for WMF-hosted wikis like Wikipedia): WMF-hosted wiki (French Wikinews)

Other information (browser name/version, screenshots, etc.):
System : Windows 10
Browser : Edge 114.0.1823.67
I'm only passing on what the browser says, but the problem is probably in the site code.

Event Timeline

I'm only passing on what the browser says

I'm not sure how helpful it is to post any kind of random browser warnings (not: errors) into Phabricator tasks.

How to Fix the Problem : https://webhint.io/docs/user-guide/hints/hint-http-cache/

That page does not mention the word stale-while-revalidate. But that's what the warning is about...

ori subscribed.

It's a bug in webhint, AFAICT. It thinks stale-while-revalidate should not hold a value, but that is wrong. This is the problematic code:

https://github.com/webhintio/hint/blob/89eff1633735f4669156dd0b2d093697f458aea7/packages/hint-http-cache/src/hint.ts#L144-L168

Consider filing a bug upstream.