Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dan

    (@geekysoft)

    You’ve specifically configured two different tools to do the same job. Duplicated headers is expected in this situation.

    Expires is a legacy header used in HTTP/1.0 in lieu of better tools (Cache-Control was introduced in HTTP/1.1).

    Disable the mod_expires module. Use mod_headers to manually add the Cache-Control header for static assets instead. E.g.

    <LocationMatch "*\.css">
    Header set Cache-Control "max-age=3456000"
    </LocationMatch>
    Thread Starter Evgeny Vlasenko

    (@mahnunchik)

    Yep, Expires is a legacy header. But providing it we may prevent Apache to add additional Expires and Cache-Control. It is relevant to mod_expires and mod_headers modules.

    Thread Starter Evgeny Vlasenko

    (@mahnunchik)

    So we will be able to use the following default Cache-Control option with custom from the plugin:

    
    ExpiresActive on
    ExpiresDefault "access plus 1 month"
    
    Thread Starter Evgeny Vlasenko

    (@mahnunchik)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘We need Expires directive to prevent apache Cache-Control duplication’ is closed to new replies.