• Resolved Julian Holzmayer

    (@julholdroid)


    Hello, i have a Problem with the browser caching (static file caching). It appears that my cache-control header is set to public for my images, but it should have public with a max-age parameter.

    I have set my WP Optimize Static File Cache to 7 Days, however it doesnt work.

    My .htaccess WP Optimize Cache Section is the follwing. Please note that something is off with the format (no tags) in this post.

    BEGIN WP-Optimize Browser Cache
    ExpiresActive On ExpiresByType text/css "access 7 days" ExpiresByType text/html "access 7 days" ExpiresByType image/gif "access 7 days" ExpiresByType image/png "access 7 days" ExpiresByType image/jpg "access 7 days" ExpiresByType image/jpeg "access 7 days" ExpiresByType image/webp "access 7 days" ExpiresByType image/x-icon "access 7 days" ExpiresByType application/pdf "access 7 days" ExpiresByType application/javascript "access 7 days" ExpiresByType text/x-javascript "access 7 days" ExpiresByType application/x-shockwave-flash "access 7 days" ExpiresDefault "access 7 days"Header set Cache-Control "public" Header set Cache-Control "public" Header set Cache-Control "private" Header set Cache-Control "private, must-revalidate" Disable ETag
    FileETag None END WP-Optimize Browser Cache

    Is this how it should work?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Damilare

    (@deabiodun)

    Hi!
    Your static file cache directives should look like this screenshot in your .htaccess file. This ensures that the specified file types expire after seven days.

    Adding a max age will help with any browser compatibilty issue, so adding that is okay.

    I’ll reach out to our development team for their thoughts on this.

    Thanks.

    Thread Starter Julian Holzmayer

    (@julholdroid)

    Thanks for the reply. My htaccess File indeed looks like this. However i think that the Cache-Control Header should also have a revalidate time, rather then only “public”.
    At least Google Lighthouse doesn’t like it to not have it.

    Thanks for checking it with the dev team

    Plugin Support Damilare

    (@deabiodun)

    True @julholdroid.
    Thanks for your suggestions. I’ll inform our development team about this.

    Regards.

    Thread Starter Julian Holzmayer

    (@julholdroid)

    Any progress on that? Thanks

    Plugin Support Damilare

    (@deabiodun)

    Hi!
    This issue has been fixed and will be introduced in a future release.

    Kind regards.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Static File Cache for Images just sets to public’ is closed to new replies.