Wordpress LScache Plugin: Cache Causing Issue with Full URL with Parameters
I am facing an issue Images load when there is a url parameter but when i remove the Url parameter and refresh on the same page. Images will show which it shouldnt Try to open new browser and try with that url and image will show. Now remove utm parameter and open in that same browser image will show still but images should not show. I tried by disabling Cache and its working as configured but due to lightspeed cache its causing help me to resolve this Case. I have made a video to let you understand this case better. Video Link The page I need help with: https://tbobuzz.com/car-blog/leasing-lucid-air-grand-touring-will-cost-you-more-than-2000-per-month-for-48-months/?utm_source=Test&utm_medium=test&utm_campaign=test&utm_id=Test Below is the Report number: TUMPTNWC Report date: 11/25/2022 13:53:45 This is not a bug or an issue, its a feature. utm_ and some other $_GET parameters are defined as a cache key in .htaccess, that prevents that specific URLs with and without $_GET parameter get different cache copy. You can remove the related cache key in .htaccess, but it will probably be overwritten next time if you change settings that causes changes to .htaccess. I have pasted below .htaccess file so kindly tell me which part to remove. That can solve the Problem. # 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 CORS start ### Header set Access-Control-Allow-Origin ### marker CORS 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] RewriteRule ^ai-statistics-report -([0-9A-Za-z . _ -]+) /wp-admin/admin-ajax.php?action=ai_ajax&ai-report=$1 [QSA,L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] # END WordPress # BEGIN CLOSTE ## Do not edit the contents of this block! ## RewriteEngine On SetEnvIfNoCase Remote_Addr ^122.163.138.57$ MODSEC-OFF RewriteCond % REMOTE_ADDR ^122 .163 .138 .57$ RewriteRule . - [E=noconntimeout:1] # END CLOSTE # BEGIN WP Cloudflare Super Page Cache # The directives (lines) between BEGIN WP Cloudflare Super Page Cache and END WP Cloudflare Super Page Cache are # dynamically generated, and should only be modified via WordPress filters. # Any changes to the directives between these markers will be overwritten. # END WP Cloudflare Super Page CacheExpand CacheKeyModify -qs:utm at section ### marker DROPQS start ### did that but issues remains the same even after clearing cache For testing exclude utm parameter from being cached. Did you any custom programming that should prevent the display of images if there are no parameters? Yes, I have Done Custom Programming to Load Image only on UTM parameters. So tell me how to resolve this. What happens if you disable the cache? If i do this. Debug Settings ?>Disable all features turn on then issue gets resolved. And if i disable only Cache Mean Cache Control Settings Enable Cache Option Turn Off. Then Issue will remain the same. You disabled the cache and it still doesnt work, right? Tell me how you did this programming? PHP or Javascript?