0

Example:

Issue with esi:assign and esi:include in a html page rendered through akamai cdn

http://www.trial.com/abc/def/ghjiy (Akamai rendering src) has content "abc"

In an html page
<esi:include src="http://www.trial.com/abc/def/ghjiy"></esi:include> will return "abc"
can I assign this to a variable so we can use it multiple times in the html  page using 
<esi:vars>$(val)</esi:vars>

I have tried something like this 
<esi:text><esi:assign name="val">'</esi:text><esi:include 
src="http://www.trial.com/abc/def/ghjiy"></esi:include><esi:text>'</esi:assign></esi:text>"

But after html page being rendered the <esi:assign> tags has not been parsed and returned 
the following in page source
<esi:assign name="val">abc</esi:assign>
  • I'm not sure that the web performance folks visit here - can you go to the Akamai community at http://community.akamai.com and visit the web performance section? You should get a timely response there. – Kirsten Jones Aug 31 '15 at 23:41

1 Answers1

1

You can use esi:eval instead of esi:include.

This http://www.trial.com/abc/def/ghjiy could return esi code fragment which will be evaluated at the edge. For example: <esi assign name="val">I assign this to a variable so we can use it multiple times in the html page using</esi:assign>

And then later you can use <esi:vars>$(val)</esi:vars>

rzasap
  • 346
  • 1
  • 6