AI Features

ESI in Order & Common

In this lesson, we'll look at how ESI is used in the common and order applications.

Order microservice

The order microservice offers a normal web interface, which has been supplemented with ESI tags in some places.

A typical HTML page of the order microservice looks like this:

<html>
<head>
...
<esi:include src="/common/header"></esi:include>
</head>
<body>
<div class="container">
<esi:include src="/common/navbar"></esi:include>
...
</div>
<esi:include src="/common/footer"></esi:include>
</body>
</html>

HTML with ESI tags in the example

The order microservice is available at port 8090 of the Docker host. The output goes past the Varnish and still contains the ESI tags. At http://localhost:8090/ the HTML with the ESI tags can be viewed.

The ESI tags look like normal HTML tags. They only have an esi prefix. Of course, a web browser cannot interpret them.

ESI tags in the HTML head

  • line 4
...