Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add extension cache-control directives #4325

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fahensha
Copy link

@fahensha fahensha commented Feb 14, 2021

Addstale-while-revalidate and stale-if-error to
extensionValueDirectives and add corresponding validation


Fix #3691

(Assuming this is a trivial change) Before this fix, scans detecting use of stale-if-error and stale-while-revalidate showed the following error (the test URL was https://simbiat.ru/):

image

After the fix, these errors no longer appear at all:

Screen Shot 2021-02-14 at 1 13 22 AM

However, there may be an even better way to do this where stale-if-error and stale-while-revalidate trigger warnings that these directives are experimental and may change according to MDN: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

Add`stale-while-revalidate` and `stale-if-error` to
extensionValueDirectives and add corresponding validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow stale-while-revalidate (and stale-if-error?) Cache-Control extensions
1 participant