• Resolved caraya

    (@caraya)


    W3 Total Cache adds items to my site’s .htaccess file.

    I would like to change the values for those configurations, particularly the expiration times for items

    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType text/css A31536000
        ExpiresByType text/x-component A31536000
        ExpiresByType application/x-javascript A31536000
        ExpiresByType application/javascript A31536000
        ExpiresByType text/javascript A31536000
    </IfModule>

    I can’t figure out where to do it or if it’s something that requires a pro version, in which case why was it added to a free version configuration?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @caraya

    Thank you for reaching out and I am happy to assist you with this.

    This is a Browser Cache configuration, more precisely the expires and cache control header. You can change the values for the individual file-types in Performance>Browser Cache section of the W3 Total Cache plugin.

    In this section, you can scroll down to CSS&JS section and change the value of Expires header lifetime:

    I hope this helps!

    Thanks!

    Thread Starter caraya

    (@caraya)

    That assumes that I want all cached content to have the same expiration lifetime but I don’t. Is there a way to control cache TTL settings for individual extensions?

    and even if this was what I wanted, the headers are not being recognized. When I run Lighthouse against the site it’s giving me values that are totally different from what’s configured in the W3 Total Cache settings

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @caraya

    Thank you for your feedback.

    As you can see in the Browser Cache options, you can set the cache control and expires header individually for HTML&XML, CSS&JS, Media&Other files.
    So you cannot set the expiration separately for, CSS and JS for files example.

    As for the headers being shown, Can you please share the website URL and please share your .htaccess file so I can check if there are any duplicate rules?

    If you are using some CDN or Cloudflare, there is a chance that the CDN settings are now respecting the origin headers.

    Thanks!

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

The topic ‘Congifuring items cache expiration’ is closed to new replies.