• Hello, I have tried all kind of ways to get this to work, but I cannot get woff, woff2 and webp files to be changed in TTL. Pagespeed from google complains about it.

    Have been trying with browser cache, in the litespeed plugin, also by hand in my htacces. No results. My provider is cloud86 witch is has LiteSpeed Enterprise.

    The WOFF files change when I change TTL, but the WOFF2 and WEBP files don’t. Also SVG and some JS files don’t. The rest is reacting normal.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • .woff and .woff2 are static sources like Javascript, images or CSS. Those static sources are cached by browser and has nothing to with server cache of the plugin. If you want to extend the time how long static sources should be cached IN BROWSER you must change setting in

    Cache -> Tab Browser -> Browser Cache TTL

    Suggested Value: 31536000
    Browser Cache: ON

    • This reply was modified 2 years, 11 months ago by serpentdriver.
    Thread Starter Rudiculous

    (@rudiculous)

    Hello and thank you for your fast respose.

    I did. I changed it multiple times, will print my htaccess here so you can see the results. But, it does not change anything in pagespeed or gtmetrix.

    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]
    RewriteRule \.litespeed_conf\.dat - [F,L]
    
    ### marker MOBILE start ###
    RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile]
    ### marker MOBILE end ###
    
    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
    ### marker FAVICON end ###
    
    ### marker WEBP start ###
    RewriteCond %{HTTP_ACCEPT} "image/webp" [or]
    RewriteCond %{HTTP_USER_AGENT} "Page Speed"
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari
    RewriteCond %1 >13
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    ### marker WEBP end ###
    
    ### marker DROPQS start ###
    CacheKeyModify -qs:fbclid
    CacheKeyModify -qs:gclid
    CacheKeyModify -qs:utm*
    CacheKeyModify -qs:_ga
    ### marker DROPQS end ###
    
    </IfModule>
    ## 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 ###
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresByType application/pdf A604805
    ExpiresByType image/x-icon A604805
    ExpiresByType image/vnd.microsoft.icon A604805
    ExpiresByType image/svg+xml A604805
    
    ExpiresByType image/jpg A604805
    ExpiresByType image/jpeg A604805
    ExpiresByType image/png A604805
    ExpiresByType image/gif A604805
    ExpiresByType image/webp A604805
    
    ExpiresByType video/ogg A604805
    ExpiresByType audio/ogg A604805
    ExpiresByType video/mp4 A604805
    ExpiresByType video/webm A604805
    
    ExpiresByType text/css A604805
    ExpiresByType text/javascript A604805
    ExpiresByType application/javascript A604805
    ExpiresByType application/x-javascript A604805
    
    ExpiresByType application/x-font-ttf A604805
    ExpiresByType application/x-font-woff A604805
    ExpiresByType application/font-woff A604805
    ExpiresByType application/font-woff2 A604805
    ExpiresByType application/vnd.ms-fontobject A604805
    ExpiresByType font/ttf A604805
    ExpiresByType font/otf A604805
    ExpiresByType font/woff A604805
    ExpiresByType font/woff2 A604805
    
    </IfModule>
    ### marker BROWSER CACHE end ###
    
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    # END NON_LSCACHE
    
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteCond %{REQUEST_URI} ^/?wp\-content/+debug\.log$
    	RewriteRule .* - [F,L,NC]
    </IfModule>
    <IfModule !mod_rewrite.c>
    	<Files "debug.log">
    		<IfModule mod_authz_core.c>
    			Require all denied
    		</IfModule>
    		<IfModule !mod_authz_core.c>
    			Order deny,allow
    			Deny from all
    		</IfModule>
    	</Files>
    </IfModule>
    
    # BEGIN LiteSpeed noabort -> https://www.wordfence.com/help/advanced/system-requirements/litespeed/
    <IfModule rewrite_module>
    	RewriteEngine On
    	RewriteRule .* - [E=noabort:1]
    </IfModule>
    # END liteSpeed noabort
    • This reply was modified 2 years, 10 months ago by Jan Dembowski.
    • This reply was modified 2 years, 10 months ago by Jan Dembowski. Reason: Formatting
    Thread Starter Rudiculous

    (@rudiculous)

    BTW I gave recognizable ttl’s so I can see what is changing in the HTacces so this is why you see A604805 instead of A604800.

    Thread Starter Rudiculous

    (@rudiculous)

    None of the settings for TTL’s or browser cache have the standard setting 604800 so it must come from something else.
    I have searched for other HTaccess files in my filetree but none had a setting for this. As my hosting provider is a Litespeed Enterprise client, I really do not know the answer.

    Thread Starter Rudiculous

    (@rudiculous)

    What is typical though is when I use a VPN and change location, there is something changing in the respose headers, the location of the QC-POP server, but still I see a x-qc-cache miss.

    This also goes for all the CCSS and optimzed JS files. They all have a x-qc-cache: miss even with repeatly refreshing. But the x-qc-pop server is showing f/e: x-qc-pop: NA-US-LAX-105

    accept-ranges: bytes
    cache-control: public, max-age=604800
    content-length: 60080
    content-type: font/woff2
    date: Thu, 28 Apr 2022 12:47:36 GMT
    etag: "eab0-62136be2-6f24e1535f76c403;;;"
    expires: Thu, 05 May 2022 12:47:36 GMT
    last-modified: Mon, 21 Feb 2022 10:39:30 GMT
    server: LiteSpeed
    strict-transport-security: max-age=15768000; includeSubDomains
    x-litespeed-tag: 130_
    x-powered-by: PleskLin
    x-qc-cache: miss
    x-qc-pop: NA-US-LAX-105
    • This reply was modified 2 years, 10 months ago by Rudiculous.

    Check your plugins. Maybe there is the reason.

    Plugin Support qtwrk

    (@qtwrk)

    LSCWP adds expire header, but you have something that set cache-control: public, max-age=604800 for you , this will override the expire header

    please either remove the cache-control header on static resources, or raise them from 604800 to 365 days

    @qtwrk

    Expire header doesn’t matter. It is only a definition for the overall time for cache lifetime of a source and can be ignored. The most important header is Cache-Control, but this header isn’t set by LSCWP.

    Since LSCWP sets an expire header I can’t understand why this header is set. This header has no effects if there is a Cache-Control header defined!? So, there is no doubt why this reported issue happens!

    Feature request for upcoming versions: Forget expire header and set cache control header instead.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WOFF2 and WEBP not cached’ is closed to new replies.