LiteSpeed ESI include injects entire page HTML instead of ESI block code
-
I’m working with LitesSpeed support on this [Ticket ID: 484308], but I thought I would post in here too in case it’s something others have experienced. In short, I’m working on a WordPress site that’s running on LiteSpeed server through Hostinger.
I’ve included an ESI block in a page template following this documentation to the letter: https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url
It generally works as intended for a few minutes – in this case, showing “Hello World” and then a random number with a ttl of 300ms (I’ve also tested nocache). After a few minutes, if I go to the page in a fresh browser, it’ll load slower than usual and dump the entire homepage of the site in where the ESI block is supposed to be.
Unfortunately I can’t share the page or the code because of client confidentiality, but LiteSpeed support didn’t find anything wrong with the code.Things I’ve tried so far:
Purging the cache (ESI block works again for a few minutes and then breaks)
Putting Cloudflare caching into dev mode and disabling Cloudflare entirely (no effect)
Trying to turn ESI on in .htaccess (I’m not sure this is even a thing but it didn’t do anything)
Changing the location/name of the ESI block (result is always the same)My only guess is there’s something conflicting with the caching or server config, or a stray WordPress plugin that I’ll have to track down, but let me know if you’ve seen this before! Thanks in advance.
- The topic ‘LiteSpeed ESI include injects entire page HTML instead of ESI block code’ is closed to new replies.