• Resolved kk25

    (@kk25)


    I have changed my cache to 14 days instead of the default 7 days, but Pagespeed insights and Gtmetrix show it as 7 days.

    And also, some of the images are not served webp.

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

Viewing 15 replies - 1 through 15 (of 27 total)
  • ‘And also, some of the images are not served webp.’

    Cache plugin only uses .webp images if .webp image format has a smaller size as the origin image, so always the best image is served!

    ‘I have changed my cache to 14 days instead of the default 7 days, but Pagespeed insights and Gtmetrix show it as 7 days.’

    Could you provide us with a bit more information?

    Thread Starter kk25

    (@kk25)

    Default TTL is set to 1209600, whereas GT Metrix and Google Pagespeed show 604800 for fonts and other files.

    Yes, webp image is smaller in size compared to the one served.

    ‘Default TTL is set to 1209600, whereas GT Metrix and Google Pagespeed show 604800 for fonts and other files.’

    There are plugins that overwrite existing settings. So you would have to check your .htaccess to see if there is a corresponding cache-control setting there. Search for “cache-control” in .htaccess.

    ‘Yes, webp image is smaller in size compared to the one served.’

    Does the .webp file exit on your server?

    Thread Starter kk25

    (@kk25)

    Here is my htaccess:

    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 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 CACHE RESOURCE start RewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php - [E=cache-control:max-age=3600] marker CACHE RESOURCE end marker FAVICON start RewriteRule favicon.ico$ - [E=cache-control:max-age=86400] marker FAVICON end marker WEBP start RewriteCond %{HTTP_ACCEPT} "image/webp"
    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 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 BEGIN WordPress The directives (lines) between "BEGIN WordPress" and "END WordPress" are dynamically generated, and should only be modified via WordPress filters. Any changes to the directives between these markers will be overwritten. RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] END WordPress

    FYI: To get best Pagespeed score you should set the value for browser cache TTL to: 31536000

    Thread Starter kk25

    (@kk25)

    It is set to 31557600 seconds = 52 weeks 1 day 6 hours

    Normally it should not be necessary to purge the quic.cloud cache, but to force changed settings you should purge QC cache.

    Thread Starter kk25

    (@kk25)

    I have purged quic cloud cache as well multiple times.

    And for your webp question: check https://www.halo.co.in/wp-content/uploads/2022/11/Overview-of-the-Program.jpg.webp

    It is available as webp but not serving.

    If TLL of your images is different as you set it in cache plugin, the logic says there is another setting that overwrites the current setting. That means there is or must be an other plugin that overwrites the setting from cache plugin, so check your installed plugins that could do that.

    • This reply was modified 3 years, 5 months ago by serpentdriver.
    Thread Starter kk25

    (@kk25)

    Here is the list of my installed plugin, and I have already shared you the htaccess file in the previous message.

    https://snipboard.io/dVxhO7.jpg

    Sorry, I can’t check each plugin you have installed which headers for cache-control are set by each plugin. This is your job to find it out. The cache plugin sets all necessary headers to make the correct TTL for cache-control available, but can’t be responsible if another plugins overwrites it.

    But, indepentable from cache plugin, there is a way to set the correct cache-control settings. Add this code on top of your .htaccess:

    <FilesMatch "\.(jpg|JPG|jpeg|webp|avif|jpe?g|woff|woff2|png|css|js|gif|swf|ico|ttf|eot|ico|js|mp4|webm|svg|json)$">
        Header set Cache-Control "public,max-age=31536000"
        Header unset ETag
        Header unset Set-Cookie
    </FilesMatch>
    Thread Starter kk25

    (@kk25)

    None of the plugins are cache plugin and are not overwriting anything. Find the issue with LS plugin and answer accordingly.

    I have added the lines in htaccess. Do I need to clear cache from the plugin?

    Thread Starter kk25

    (@kk25)

    I have cleared the LS cache, but still the same issue.

    ‘None of the plugins are cache plugin and are not overwriting anything.’

    This has to be verifyd!

    ‘Do I need to clear cache from the plugin?’

    If you don’t have quic.cloud there is no need to purge, but do it anyway. It doesn’t hurt doing it.

Viewing 15 replies - 1 through 15 (of 27 total)

The topic ‘TTL & WebP Issue’ is closed to new replies.