• Resolved janjireashwini1

    (@janjireashwini1)


    I have selected under Browser Caching option, 1 year expiry period for CSS, JAVA, images, Media, Cloudfare. BUt in the performance test it says 73 resources have 4 hour expiry for cache. I also check pagespeed tests in other website, there also it shows error that caching expiry at 4 hours (ex. GTmetrix).

    How to fix this?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @janjireashwini1 ,

    After you changed the expiry time was the htaccess file updated with the new code?
    In the .htaccess file there should be code like below:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0
    
    <FilesMatch "\.(txt|xml|js)$">
    ExpiresDefault A31536000
    </FilesMatch>
    
    <FilesMatch "\.(css)$">
    ExpiresDefault A31536000
    </FilesMatch>
    
    <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
    ExpiresDefault A31536000
    </FilesMatch>
    
    <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
    ExpiresDefault A31536000
    </FilesMatch>
    </IfModule>
    
    <IfModule mod_headers.c>
      <FilesMatch "\.(txt|xml|js)$">
       Header set Cache-Control "max-age=31536000"
      </FilesMatch>
    
      <FilesMatch "\.(css)$">
       Header set Cache-Control "max-age=31536000"
      </FilesMatch>
    
      <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
       Header set Cache-Control "max-age=31536000"
      </FilesMatch>
    
      <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
       Header set Cache-Control "max-age=31536000"
      </FilesMatch>
    </IfModule>

    if its not there or is not identical, please update it and check again.

    kind regards,
    Kasia

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @janjireashwini1

    It’s been a while since we’ve heard back from you so I’m going to mark this topic as resolved. You can still post back any updates and we can continue.

    Take care,
    Dimitris

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

The topic ‘Browser Cache’ is closed to new replies.