• Hi, a user of my XML sitemap plugin is having trouble with his sitemap. The site runs on a Litespeed server with the LSCache plugin.

    When visiting the /sitemap.xml index the first time all seems fine but reloading it, results in an empty response with these in the response header:

    
    server: LiteSpeed
    vary: Accept-Encoding,User-Agent,User-Agent
    x-litespeed-cache-control: no-cache
    x-litespeed-tag: a2e_HTTP.304
    

    When trying and reloading a “fresh” URL like /sitemap.xml?nocache the response is correct again with these headers:

    
    server: LiteSpeed
    vary: Accept-Encoding,User-Agent,User-Agent
    x-litespeed-cache: hit
    

    What is going wrong?

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

    (@qtwrk)

    does the sitemap give different result based on user browser, user agent or something ?

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    The user has now switched to the YOAST sitemap (sitemap_index.xml) which apparently does not suffer this issue, but as far as I was able to test before the switch it appeared that each new/virgin browser request first invoked a good response but then subsequent reloads would give the empty response with the headers mentioned above.

    Sadly I’m not able to reproduce it on my own hosting space because that is an Apache with Litespeed proxy, which (as far as I can tell) works differently.

    The sitemap plugin itself tries to set the response header Cache-Control: no-cache, must-revalidate, max-age=0 so I’d say the viewed header x-litespeed-cache-control: no-cache is good, but where does this x-litespeed-tag: a2e_HTTP.304 header come from? And why the empty response while still giving a 200 status code, not 304?

    • This reply was modified 2 years, 8 months ago by Rolf Allard van Hagen. Reason: remove "no-store" as that is only for the news sitemap not the regular sitemap
    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    By the way, the site in question does still use the news sitemap on /sitemap-news.xml and there the issue does not occur. It always responds with 200 status code, full content and the headers:

    
    server: LiteSpeed
    vary: Accept-Encoding,User-Agent,User-Agent
    x-litespeed-cache-control: no-cache
    x-litespeed-tag: a2e_HTTP.200,a2e_default,a2e_URL./sitemap-news.xml/,a2e_FD,a2e_
    

    The only difference between the two is that the news sitemap has an extra “no-store” in its cache-Control header. Is that what is going wrong with the regular sitemap?

    But then why not a matching 304 status response?

    Plugin Support qtwrk

    (@qtwrk)

    the plugin itself doesn’t really give or change any status code , it is given by the site script , webserver-browser

    no , plugin doesn’t care the cache-control header

    how does it behave with LSCWP OFF?

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    I’ll ask the site owner and see if they are willing to do some further testing…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Empty sitemap with response header x-litespeed-tag: a2e_HTTP.304’ is closed to new replies.