• Resolved ashique12009

    (@ashique12009)


    Hi, I need to put cache policy in:
    Serve static assets with an efficient cache policy 45 resources found
    I put Expires header lifetime: 15552000 sec
    And press save and purge all cache but no luck, google is showing this: https://prnt.sc/2Ke0C1hlWG4p
    All are none, any hints!
    Thanks!

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

    (@vmarko)

    Hello @ashique12009

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

    Can you please share the screenshot of the Performance>Browser Cache section, and also share your .htaccess file to see if the settings enabled in the Browser Cache section are reflecting the rules in your .htaccess?

    Please share the entire .htaccess so I can check for any custom rules.

    Also, make sure that you don’t have any custom expires and cache-control rules in the upper level of the website folder structure, as they will override the rules in the website folder.

    Thanks!

    Thread Starter ashique12009

    (@ashique12009)

    Here is the htaccess code:
    https://pastebin.com/CEyjUJYT

    Screenshot of little portion of screen: https://prnt.sc/D68kVL3qST69
    Full screenshot: https://www.awesomescreenshot.com/image/39335804?key=86f462ee3642170f6716a336dc14de05

    • This reply was modified 3 years, 1 month ago by ashique12009.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ashique12009

    Thank you for your feedback. The first thing I’ve noticed is that you have duplicate rules. The rules at the top of your .htaccess file are identical to the # BEGIN WordPress rules at the bottom of the .htaccess so you should remove those rules from the top(make a backup first):

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^v4checkout/?$ /easyCheckout.php?v4checkout [QSA,L]
    RewriteRule ^sslcommerzipn/?$ /easyCheckout.php?sslcommerzipn [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Once removed, re-save the settings, purge the W3 Total Cache cache, and check if the headers are present.

    the W3TC rules are there so it’s not a problem with the rules added by the W3TC

    If this does not solve the problem please check the upper level of your server folder structure for any other .htaccess files or httpd.conf file for any rules that may prevent W3TC from adding the expires and cache control header.

    Thanks!

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

The topic ‘Browser cache is not working’ is closed to new replies.