• Resolved harmonyous

    (@harmonyous)


    I made a new site and when I checked it out in gtmetrix, I found that the browser caching is only for 7 days. I’m using cloudflare but I set it up to respect the website’s TTL so it shouldn’t be it. Below is what’s on my .htaccess file. It might be because of that cat in the end but I’m not sure.

    BEGIN LSCACHE
    
    LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!
    
    
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]
    RewriteRule .litespeed_conf.dat - [F,L]
    
    marker CACHE RESOURCE start
    
    RewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php - [E=cache-control:max-age=3600]
    
    marker CACHE RESOURCE end
    
    marker LOGIN COOKIE start
    
    RewriteRule .? - [E="Cache-Vary:,wp-postpass_f0d72418dd2ebc9a425c4595558d2d36"]
    
    marker LOGIN COOKIE end
    
    marker FAVICON start
    
    RewriteRule favicon.ico$ - [E=cache-control:max-age=86400]
    
    marker FAVICON end
    
    marker DROPQS start
    
    CacheKeyModify -qs:fbclid
    CacheKeyModify -qs:gclid
    CacheKeyModify -qs:utm*
    CacheKeyModify -qs:_ga
    
    marker DROPQS end
    
    LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!
    
    END LSCACHE
    
    BEGIN NON_LSCACHE
    
    LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!
    
    marker BROWSER CACHE start
    
    
    ExpiresActive on
    ExpiresByType application/pdf A31557600
    ExpiresByType image/x-icon A31557600
    ExpiresByType image/vnd.microsoft.icon A31557600
    ExpiresByType image/svg+xml A31557600
    
    ExpiresByType image/jpg A31557600
    ExpiresByType image/jpeg A31557600
    ExpiresByType image/png A31557600
    ExpiresByType image/gif A31557600
    ExpiresByType image/webp A31557600
    
    ExpiresByType video/ogg A31557600
    ExpiresByType audio/ogg A31557600
    ExpiresByType video/mp4 A31557600
    ExpiresByType video/webm A31557600
    
    ExpiresByType text/css A31557600
    ExpiresByType text/javascript A31557600
    ExpiresByType application/javascript A31557600
    ExpiresByType application/x-javascript A31557600
    
    ExpiresByType application/x-font-ttf A31557600
    ExpiresByType application/x-font-woff A31557600
    ExpiresByType application/font-woff A31557600
    ExpiresByType application/font-woff2 A31557600
    ExpiresByType application/vnd.ms-fontobject A31557600
    ExpiresByType font/ttf A31557600
    ExpiresByType font/otf A31557600
    ExpiresByType font/woff A31557600
    ExpiresByType font/woff2 A31557600
    
    marker BROWSER CACHE end
    
    LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!
    
    END NON_LSCACHE
    
    Rewrite Rules Added by CyberPanel Rewrite Rule Generator
    
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
    
    End CyberPanel Generated Rules.
    
    cat: /home/mydomain.com/public_html/.htaccess: No such file or directory

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • You are using 3 types of page cache at the same time! Cloudflare, Super Cache Plugin and LiteSpeed LScache plugin. Sorry, that can’t work!

    Thread Starter harmonyous

    (@harmonyous)

    So, the header expires are not working because I’m using 3 page caching? Before I raised a support question here, I also tried using LScache only or Super cache only but those didn’t fix the expires header issue.

    In any case thanks for checking it out. You can mark this one complete.

    Because you also use Cloudflare cache and this cache overrides settings on your server!

    Plugin Support qtwrk

    (@qtwrk)

    please provide the report number

    you can get it in toolbox -> report -> click “send to LiteSpeed”

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Header Expires not working for some reason’ is closed to new replies.