Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3606872
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:18:15+00:00 2026-05-18T21:18:15+00:00

Hey everybody. I’m using Edge Side Includes on Varnish to cache a static HTML

  • 0

Hey everybody. I’m using Edge Side Includes on Varnish to cache a static HTML shell, then include some dynamic HTML and a JSON object.

The ESI for HTML is getting included properly, but the ESI for the JSON object is not being included; Debug statements establish that Varnish sees it, but it inexplicably decides not to include the JSON ESI.

Here’s the loading structure:

page uncached. blank page with headers to set a cookie and esi 1
esi 1 cached. A bunch of static HTML, plus esi 2 and esi 3
esi 2 uncached. A JSON object which is different on every page load.
esi 3 uncached. Some HTML which updates with every page load.

Again, esi 1 and esi 3 work just fine, but esi 2 is not getting included. The content at esi 2 is just this:


{session_page_history_id:24231}

I read that ESI code which doesn’t look like XML causes errors, so I set the runtime parameter esi_syntax=0x7 . No dice, but at least I’m getting some debug data now.

The broken call for esi 2 looks like this:


<esi:include src="http://www.domain.com/dynamic_esi/print_variables?esi__desired_var_names[]=session_page_history_id&for_esi=1"/>

And the (working) call for esi 3 looks like this:


<esi:include src="http://www.domain.com/dynamic_esi/get_service_magic_html?&for_esi=1"/>

As I mentioned, Varnish appears to recognize that I’m trying to make an ESI include, but this is the only relevant Debug message I get from varnishlog:


   25 Debug        c AddBit: 6997 <<![CDATA[

window.esi__values =

<esi:include src="http://www.domain.com/dynamic_esi/print_variables?esi__desired_var_names[]=session_page_history_id&for_esi=1"/>
;

 //]]>
 </script>
 <link rel="stylesheet" href="http://www.

The output seen by a client contains all the normal content, but with the <esi> tag left intact. It looks just like what you see in the above Debug message.

Does anyone know why esi 2 isn’t getting parsed/included? Any help would be GREATLY appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:18:16+00:00Added an answer on May 18, 2026 at 9:18 pm

    So apparently the ESI tag wasn’t getting processed because it was inside a //[CDATA[ block. I’m sure this has something to do with XML compliance. I thought that setting esi_syntax=7 would prevent such a problem, but it turns out that that only affects the content of the ESI itself (it doesn’t lift the safety checks for the code which does the including).

    The solution will be to rework my application so that the ESI is its own self-contained script tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey right now I'm using jQuery and I have some global variables to hold
Hey everybody ! I am a beginner programmer and need some help with pointers.
Hey everybody, I want to create an app that handles some sort of recognition
Hey everyone, I'm using Virtual PC and working with a virtual hard disk (*.vhd)
Hey, I'm using Levenshteins algorithm to get distance between source and target string. also
Hey having some trouble trying to maintain transparency on a png when i create
Hey everybody, Im really confused about this problem. Ill try to describe it: The
Hey everybody, this is what I have going on. I have two text files.
Hey everybody, got an interesting question I think. I've got a Silverlight3 application which
Hey guys. I'm not much of a programmer, but still need to do some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.