• Resolved halfmack

    (@halfmack)


    My hosting provider supports litespeed but not the litespeed crawler to populate the cache.

    I’m trying to use wget to populate the cache but haven’t been able to figure out the appropriate options to make this happen.

    I’ve tried the following:

    wget –save-cookies cookies.txt –no-cache –no-proxy -p -U “Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36” https://mywebsite.com/example/

    but the page doesn’t get cached. When I browse with a real web browser the page doesn’t display instantly like it would when it’s cached.

    I’ve run the wget from both the web host as well as from a remote client but have been unsuccessful.

    What wget options should I use to populate the litespeed cache?

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

    (@qtwrk)

    you need to send user-agent, accept, accept-encoding headers

    for example curl -I -XGET -H "user-agent: Chrome" -H "accept: /,image/webp" -H "accept-encoding: br,gzip"https://xxx

    Thread Starter halfmack

    (@halfmack)

    Much thanks, this did the job.

    Though I had to drop the -I option as it only fetches the header.

    -XGET can also be dropped as GET is the default http request method.

    Thanks again!

    mukoka

    (@mukoka)

    @halfmack

    It is essential that you do not use the -I parameter. WordPress and the LiteSpeed LScache plugin expect the response body query. Otherwise, a URL will not be cached, but the query for the response body is unique, so that it is not necessary for any other CMS to query the response body for a URL to be respected. The consequence of requiring the -I parameter is an exorbitant increase in traffic for the cache because much more data has to be transferred for the response bods. That’s why crawling and cache warmup take much longer.

    You should also add the term “lscache_runner” to the UA agent. This UA Agent updates the cache and the TTL for the cache.

    FYI: The built-in crawler’s block can easily be bybassed. Just ask Google how to do it. “How to enable LiteSpeed Cache Plugin Crawler for WordPress if it is disabled in LiteSpeed Server”

    Use quotation marks to get the right search result.

    • This reply was modified 7 months ago by mukoka.
    • This reply was modified 7 months ago by mukoka.
    • This reply was modified 7 months ago by mukoka.
    • This reply was modified 7 months ago by mukoka.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘What are the wget options to populate litespeed cache’ is closed to new replies.