Skip to content

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

@d-miles

Description

@d-miles

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions