Litespeed + Cloudflare problem with webP




Wordpress LScache Plugin: Litespeed + Cloudflare problem with webP

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello there, I use Litespeed Cache to connect object cache via memcached and Cloudflare Pro to deliver fast my website Actually I cannot deliver webp via cloudflare polish (and other CDNs neither) because my vary header is returning: User-Agent,User-Agent The reason that Polish is not turning images into webp is that the origin web server sends a vary header with a value other than accept-encoding. Same if i deactivate memcached? Should i set something in my Litespeed Cache plugin? This topic was modified 6 months, 1 week ago by danieledezi. I dont think LSCWP will create vary header ? I am not accusing just seeing a cache problem and not using other plugins i thought Litespeed Cache in some way created this problem (probably not?) Ive understood that problem is in htaccess (dont know who modified it because i am not a developer so i am just trying to understand) where i am reading this: SetOutputFilter DEFLATE # Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4 .0[678] no-gzip # MSIE masquerades as Netscape, but it is fine # BrowserMatch bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 # the above regex wont work. You can use the following # workaround to get the desired effect: BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html # Dont compress images SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary # Make sure proxies dont deliver the wrong content Header append Vary User-Agent env=!dont-vary Expand Probably i should modify it right? Can you advice me how to do it? I want deliver webp and it looks like this prevent to do it? this rule is not created by LSCWP the only thing in LSCWP that related is webp replacement option , but I dont that will be case here since CF will be in front to interpret the requests but this rule does look like related to vary and webp , suggest backup and remove them to check. Hi @danieledezi this works for me to get Cloudflare Polish work. #set header for Cloudflare image compression Header set Vary: Accept-Encoding #the end of set header for Cloudflare image compression Make sure that quotes are standard ones, here are converted to left-right side I hope that will help Yes Jaro, finally working thanks



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference