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

HTTP Cache hint recommends Apache directives that, when used, trigger the Disallowed HTTP Headers hint (Expires header) #1113

Open
d-miles opened this issue Mar 8, 2023 · 0 comments

Comments

@d-miles
Copy link

d-miles commented Mar 8, 2023

This is occurring with Apache 2.4.6 running on CentOS 7 (RHEL7, 2.4.6-97.el7.1), and browsing in Microsoft Edge 109.0.1518.70 (Jan 26, 2023) (didn't check with Chrome, but I'm sure it's not browser specific).

On the HTTP Cache hint page, they list a handful of Apache directives that can be used to set the Cache-Control header appropriately for all requests.

However, using these directives then triggers the following Disallowed HTTP Headers hint:

The 'Expires' header should not be used, 'Cache-Control' should be preferred.

The Apache configuration page also lists the same directives.

I was already supplying Cache-Control headers but opted to try using these directives to supply Cache-Control for all of my static resources. Since these hints are conflicting, I'm just going to drop the use of mod_expires for now.

Would it be possible for additional clarity to be added here with new directives written for Apache? I haven't had a chance to check what headers IIS will send using the provided Web.config settings, but if IIS also serves the Expires header then it would be ideal to update those as well.

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

No branches or pull requests

1 participant