Empty sitemap with response header x-litespeed-tag: a2e_HTTP.304




Wordpress LScache Plugin: Empty sitemap with response header x-litespeed-tag: a2e_HTTP.304


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? does the sitemap give different result based on user browser, user agent or something ? 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 Im 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 Id 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? Reason: remove no-store as that is only for the news sitemap not the regular sitemap 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? the plugin itself doesnt really give or change any status code , it is given by the site script , webserver-browser no , plugin doesnt care the cache-control header how does it behave with LSCWP OFF? Ill ask the site owner and see if they are willing to do some further testing?
Do you need help?
We are online almost any time and ready to answer any question. The answer to your question will come faster than it takes you to release the mouse button.

Ask A Question