Support » Plugin: LiteSpeed Cache » esi breaking widget

  • Resolved andrew55


    I am using your plugin’s ESI feature within a widget to prevent caching of share buttons (I’m using Easy Social Share Buttons plugin by appscreo).

    I need to do this because our share buttons have unique affiliate id code in them, and with full-page cache, the id code is getting cached (which I don’t want).

    I am using “Widgets On Pages” plugin to post share buttons within my pages. In this widget, I have a text widget with share button shortcode and I have ESI enabled.

    When ESI is enabled within a widget, it is breaking content within that widget is some circumstances.

    Here, you can see the share buttons (from the Widgets On Page shortcode) showing right above the H1 title.

    But here, you can see the same share buttons are NOT showing right above the H1 title.

    After rigorous testing, I realized the only thing which is breaking ESI feature is when a page has an image within it’s content.

    The only difference between my example that works and my example that doesn’t work, is the non-working example has an image within the content of the page.

    I tried disabling Lazy Load within your plugin, and this doesn’t correct the issue?

    When disabled LiteSpeed Cache plugin, problem is resolved, but of course, I have no caching capability.

    When disabled ESI feature within widget, problem is resolved, but of course, content within widget (share buttons) get cached (which I don’t want).

    I tried disabling optimization of all css and js within LiteSpeed Cache plugin, but this doesn’t resolve the issue.

    Any ideas why having an image within the content of the page is breaking a widget using ESI?

    Any suggestions on how I can resolve this or at least troubleshoot what is causing this strange issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hai@LiteSpeed⚡



    When I check your 2nd not working page, I notice in source code, the ESI block is parsed wrongly. which is <ul><include src="/?lsesi=widget&_control=private%2Cno-vary&esi=YTo0Ontz********" cache-control="private,no-vary"></include></ul></div><h1>Lifeleap Vision &ndash; About LifeLeap Institute</h1>

    I believe that is bcos some of other functions replaced that ESI tag somehow, which will cause that ESI not be able to be parsed by server when the buffer outputted.

    Can you turn on log to advanced level and post the log in a gist, then share with us? If you like you can paste the gist link in a tix.




    Here is the link of the gist (debug):

    Let me know if you need me to do anything else.

    Thank you for the help.

    Plugin Support qtwrk



    Your log seems incomplete.

    Please try following:

    1. enable advance debug log with your IP

    2. open debug log page.

    3. purge all

    4. clear up debug log (there is a button at bottom of log page to clear it)

    5. access your page where widget is broken.

    6. please share that log

    Best regards,



    OK, I think I got the debug log correct this time. Here is the link to new log:

    Let me know if you need me to do anything else.

    Thank you for the help.

    • This reply was modified 8 months ago by andrew55.
    Plugin Support stanley@litespeed


    Hi @andrew55, could you please join our Slack channel or submit a ticket here for helping us to reproduce the bug, thanks!



    Thank you. I created a ticket.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘esi breaking widget’ is closed to new replies.