• Resolved wpschools

    (@wpschools)


    Hello! I am using WP-Optimize 3.0.13 By default in caching of headers at me it was written that caching is disabled. I set the time and pressed on. After reloading the page I have again shows what is disabled.
    I looked in the file .htaccess cache settings written.
    ================================
    # BEGIN WP-Optimize Browser Cache
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css “access 28 days”
    ExpiresByType text/html “access 28 days”
    ExpiresByType image/gif “access 28 days”
    ExpiresByType image/png “access 28 days”
    ExpiresByType image/jpg “access 28 days”
    ExpiresByType image/jpeg “access 28 days”
    ExpiresByType image/webp “access 28 days”
    ExpiresByType image/x-icon “access 28 days”
    ExpiresByType application/pdf “access 28 days”
    ExpiresByType application/javascript “access 28 days”
    ExpiresByType text/x-javascript “access 28 days”
    ExpiresByType application/x-shockwave-flash “access 28 days”
    ExpiresDefault “access 28 days”
    </IfModule>

    <IfModule mod_headers.c>
    <filesMatch “\.(ico|jpe?g|png|gif|webp|swf)$”>
    Header set Cache-Control “public”
    </filesMatch>
    <filesMatch “\.(css)$”>
    Header set Cache-Control “public”
    </filesMatch>
    <filesMatch “\.(js)$”>
    Header set Cache-Control “private”
    </filesMatch>
    <filesMatch “\.(x?html?|php)$”>
    Header set Cache-Control “private, must-revalidate”
    </filesMatch>
    </IfModule>

    #Disable ETag
    FileETag None
    # END WP-Optimize Browser Cache
    ==================================
    But for some reason it does not work. And when scanning gtmetrix also shows that you need to enable caching of static headers.
    What could be the reason? Thanks!
    Screen1 https://snipboard.io/B1XK8t.jpg
    Screen2 https://snipboard.io/Gq291R.jpg

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    Could you share your site’s URL? Do you use any CDN such as CloudFlare?
    As these can override those headers.

    Marc.

    Thread Starter wpschools

    (@wpschools)

    Do you use any CDN such as CloudFlare?

    We do not use CDN and CloudFlare.

    Okay. Could you share your site’s URL?

    Thread Starter wpschools

    (@wpschools)

    The site link in the problem description.

    Hi,

    I have the same problem. I use Godaddy pro host and have their CDN enabled.

    How can I get it working with it?

    Thanks! Hoi

    @wpschools Sorry for the delay on replying to this.

    I looked and couldn’t see an obvious reason why it wouldn’t work.
    So either your server doesn’t allow the settings to be overridden, either your .htaccess has an issue, or something like that.

    @hoiung

    > I use Godaddy pro host and have their CDN enabled.

    As the assets are delivered by the CDN, their headers can’t be controlled from WordPress. This has to be done via the CDN provider. You can check on your Godaddy’s account if they have such settings.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Browser static file caching not working’ is closed to new replies.