How do I enable basic ESI in my VCL?



  • Leo Lapworth

    Can fastly then compress the output to the client, ie. after the esi has been processed?

  • Austin Spires

    @ranguard not at the moment, though we're actively working on supporting this :smiley:. Depending on the way you're using ESI, conditionally deactivating gzipping for ESI content may be workable in the interim. But, if you're gzipping a significant portion of your content, this isn't ideal.

  • Andri Antoniades

    To see an example of ESI logic already inserted into Fastly's boilerplate, please visit this public Github repo, which also contains examples of CSRF tags in HTML:

    And to check out more examples of how you can use ESI logic, visit our follow-up ESI Community Page:

  • TimWeyand


    not at the moment, though we're actively working on supporting this

    has there been any progress in allowing ESI and compression? We have moved to fastly last Year and one of the reasons was support for ESI. We had to drop it temporarily from our Websites to allow everything to work, but my developers are still sad - that we can't use it right now.

    Best, Tim

  • Justin

    Hi @TimWeyand

    We currently have an implementation that some customers are using, but it's not been made generally available. There are a few criteria that need to be in place to use it, but to find out more, and if it'll be available for you to use, send in a support ticket and we'll let you know.

Please sign in to leave a comment.