• Resolved gcnj123

    (@superfc7)


    I can’t find ‘x-litespeed-cache’ in the console of the website.
    There is an entry: X-Litespeed-Cache-Control: public,max-age=604800 or private,max-age=1800
    But no ‘x-litespeed-cache’. It is likely that the cache is not working.

    I had previously using Cloudflare. In order to troubleshoot, I set Cloudflare to developer mode to disable its cache and disabled the entire CDN by ‘pause Cloudflare on site’. But it still didn’t work.

    This is my report: IQXOOTTO

Viewing 15 replies - 1 through 15 (of 15 total)
  • serpentdriver

    (@serpentdriver)

    Would you provide us with a link to your page?

    Thread Starter gcnj123

    (@superfc7)

    serpentdriver

    (@serpentdriver)

    Ask your hosting provider if LiteSpeed cache is enabled.

    serpentdriver

    (@serpentdriver)

    Also, you have some custom rewrite modifications in your .htacces that you have to remove.

    Thread Starter gcnj123

    (@superfc7)

    There is a litespeed cache option on my hosting’s panel. It is enabled.

    Thread Starter gcnj123

    (@superfc7)

    you mean these line?
    RewriteCond %{HTTP_ACCEPT} “image/webp” RewriteCond %{REQUEST_FILENAME}.webp -f RewriteRule ^(.*).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L]

    serpentdriver

    (@serpentdriver)

    This panel says nothing. Create a blank PHP file, copy the code from below in this file, transfer it to your server where WordPress is installed and request this page.

    <?php
    phpinfo();

    If requested search for $_SERVER['X-LSCACHE']. The value must be at least on

    Remove the file.

    serpentdriver

    (@serpentdriver)

    you mean these line?
    RewriteCond %{HTTP_ACCEPT} “image/webp” RewriteCond %{REQUEST_FILENAME}.webp -f RewriteRule ^(.*).(jpg|jpeg|png|gif) $1.$2.webp [T=image/webp,L]

    No, but this code is also custom.

    Check .htaccess for any cache-control entry

    Thread Starter gcnj123

    (@superfc7)

    I found a total of 6 ‘cache-control’, 4 of which seem to be related to images. The remaining two, I don’t know what they mean, I don’t dare to modify these codes casually:

    #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 CACHE RESOURCE start#

    RewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php – [E=cache-control:max-age=3600]

    #marker CACHE RESOURCE end#

    Apart from the lines I added in my last reply, I haven’t edited anywhere else. I think these should be entries that originally existed.

    As for whether the litespeed cache is enabled, I need some time to learn the operation. After completion, I will reply.

    serpentdriver

    (@serpentdriver)

    Apart from the lines I added in my last reply, I haven’t edited anywhere else. I think these should be entries that originally existed.

    All posted code is default code set by the cache plugin, but the response header for cache control is not default. Do you have any plugin installed that can cause it?

    As for whether the litespeed cache is enabled, I need some time to learn the operation. After completion, I will reply.

    Cache function enabled? Try the the test code i have posted. It’s simple and fast to get a result.

    Thread Starter gcnj123

    (@superfc7)

    I check the phpinfo. The value of $_SERVER[‘X-LSCACHE’] is on,crawler,esi,combine

    I think it is good.

    I have installed another plugin called Super Page Cache for Cloudflare. But in order to troubleshoot, I have completely restored the files and database to the state before installing this plugin, so I don’t think it’s the reason. I haven’t installed any other caching plugins. I don’t want to disable all plugins to troubleshoot, so I decide to create a subdomain, install a new WordPress and install Litespeed cache only to test if this will work.

    • This reply was modified 3 years ago by gcnj123.
    Thread Starter gcnj123

    (@superfc7)

    I switched the nameserver from Cloudflare back to my hosting provider, and now the ‘x-litespeed-cache’ header has appeared and is showing as a hit. Next, I plan to give up Cloudflare and use quic.cloud instead. Now my concern is, if I switch the nameserver to quic.cloud, will it also cause the header disapear?

    serpentdriver

    (@serpentdriver)

    will it also cause the header disapear?

    No. quic.cloud is especially made for WordPress and the LiteSpeed cache plugin and nothing else.

    Thread Starter gcnj123

    (@superfc7)

    Thank you for your help. The issue solved.

    serpentdriver

    (@serpentdriver)

    Please mark it as solved.

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

The topic ‘No ‘x-litespeed-cache’ header’ is closed to new replies.