-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add Site Health test to verify that static assets are served with far-future expires #323
Comments
That makes sense, should we define the cache headers list and what we consider far-future expire? |
I think the headers would be Also, there could be some cases where an author needs for an asset to not have a far-future expiration date. In that case, there could be a filter to exclude it from the test. Lastly, in addition to far-future expiration, the test could also check for |
@westonruter out of curiosity, do you think this is something that a site admin could take direct action on? |
This comment has been minimized.
This comment has been minimized.
Good question. Maybe not directly. They'd have to ask their host to fix the static asset response headers. But I do know that some plugins can modify |
Feature Description
In order to leverage the browser cache effectively, page assets like images, scripts, and stylesheets should all be served with far-future expires. A Site Health test could be added which checks for the necessary asset response headers (i.e.
Cache-Control
and/orExpires
) and warns when they are not present. The call to action would be to fix the web server configuration, potentially prompting the user to contact their host.The text was updated successfully, but these errors were encountered: