Main differences between SSI (Server Side Include) and ESI (Edge Side include)
Solution 1
The tags for SSI and ESI are so similar that I wouldn't worry about this overly much. Varnish only supports the most basic use of ESI anyway.
Use SSI and nginx since you have them, and if you ever need the caching of Varnish, you're only a trivial shell script away from changing your SSIs to ESIs.
Solution 2
Varnish is designed for that, so you will have more options with Varnish to manage cache than with Nginx (even if Nginx has lot of options built-in).
Since Nginx always fit my needs (simple fragment cache, proxy, good speed...) I never try Varnish yet !
![Max](https://i.stack.imgur.com/k8pTp.png?s=256&g=1)
Max
Analytics consultant available for hire. More info: https://maxcorbeau.com
Updated on September 18, 2022Comments
-
Max almost 2 years
I need to include dynamic content into static pages at web server level. The 2 options I have found so far are
Server Side Include (SSI)
andEdge Side Include (ESI)
.While the origins of
SSI
seem old and obscure (that cached page from 95 from University of Illinois seems to be the reference, apparently it's from theNCSA httpd
webserver which used to power about 95% of the net), that ofESI
seem more recent and rejoicing (w3 specifications from 2001, written mostly by guys from Akamai).Also, I keep hearing about
Varnish
+ESI
and I'm wondering whether that should therefore be the way to go. However I already have a setup in place withnginx
, which only supportsSSI
, and would like to follow theKISS
principle and avoid usingVarnish
if at all possible.For my immediate use case, which will be to include a dynamic user bar at the top of each pages, I believe
SSI
will do the job. However I'm concerned that as my website grows, I will need features only supported byESI
which will force me to re-design everything, which brings me to my question (finally the reader says):What are the main features not supported by
SSI
that would make you chooseESI
(and vice versa) ?-
Steve Townsend almost 12 yearsOther than simplicity of design, why can't you leverage both?
-
Max almost 12 yearsSimplicity of design is the reason why I wouldn't leverage both at this point (not because I think they wouldn't fit together but because I wouldn't have the time to implement and maintain both I think).
-
Julien over 11 yearsTo what I've seen, ESI is just like SSI, but with more features (try-catch,...).
-