• Resolved Bruno Cantuaria

    (@cantuaria)


    Hello,

    A few users are complain that sometimes the page load this way:

    I couldn’t replicate and the issue seems really rare, but 4 users complained this week. After a page reload it fixes.

    Can this be an issue caused by LiteSpeed? Maybe something wrong with LiteSpeed + Cloudflare?

    Thanks for any input.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support qtwrk

    (@qtwrk)

    <IfModule LiteSpeed>
        SetEnv no-brotli
        SetEnv no-gzip 1
    </IfModule>
    
    

    please try add this to your htaccess, then purge all , purge CF cache.

    Maybe something wrong with LiteSpeed + Cloudflare?

    @qtwrk’s suggested solution is most likely not a solution. You’re using CloudFlare’s cache feature and that’s bad in two ways. CloudFlare does not sync its cache with LiteSpeed Cache. As a result, CloudFlare shows outdated content when you update the content on your site. You can use CloudFlare, but you are not allowed to use CloudFlare’s cache function, otherwise this will be the reason for incorrect encoding.

    Thread Starter Bruno Cantuaria

    (@cantuaria)

    Thanks for the feedback. I’ll play with the Brotli and Gzip for both Cloudflare and local to see if the issue still happens.

    @supervisior could you describe more about this encoding error when Cloudflare have a version of the cache and Litespeed have another? Maybe we can find something to mitigate it. Currently we use Cloudflare Cache because it’s simply overpowered and drastically reduces our server load. We’ve built internal API integration with Cloudflare to clear content whenever we clear LiteSpeed cache, even in special cases.

    What the exact cause of the encoding error is cannot be explained in detail. What is certain, however, is that by using 2 page caches twice, you no longer have sufficient control over which cache causes which error. You will also lose the opportunity to receive qualified support because both LiteSpeed and CloudFlare can only provide a warranty for their own cache. In addition, many optimization functions are not compatible with the CF cache. To put it bluntly, if you have too much time and you like to deal with problems to pass the time, then use both caches. Otherwise, disable the CF Cache and use quic.cloud instead because only quic.cloud is compatible with the cache plugin.

    Plugin Support qtwrk

    (@qtwrk)

    for unknown reason , when origin sends encoded content (gzip’ed or br’ed) , but CF thinks it’s not , so CF double compressed it and send to user , that lead to this , I think.

    so you could try disable compression at origin , and let CF to do the compression for visitors

    and since connection between origin and CF servers are usually datacenter-grade, disable compression between origin/CF should not be a problem.

    Thread Starter Bruno Cantuaria

    (@cantuaria)

    Thanks guys. This was very helpful. I’ll investigate further and tweak things and will udpate here for future reference.

    We use this same setup for other websites (some with even more audience) but didn’t had a complain yet.

    I’ll mark this as solved by now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Encode Error?’ is closed to new replies.