Skip to content
ESI implementation for Rack
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
README.rdoc
Rakefile
VERSION
esi-for-rack.gemspec

README.rdoc

EsiForRack

What is ESI?

ESI is a standard way to assemble pages. This spec is supported by several reverse proxies.

slideshare.net/joshbuddy/to-the-edge-of-web-performance-and-beyond

Usage

In your builder, just use it.

use EsiForRack

In your HTTP responses, just normal ESI tags. If you're working within Rails, give Spackle a try.

github.com/joshbuddy/spackle

Here is an example of a response that would be parsed by EsiForRack

<html>
  <body>
    <esi:include src="/helloworld"/>
  </body>
</html>

In this case, a request to /helloworld would be made by EsiForRack to fill in the request. If your application sent: “Hey world” as a response to /helloworld the above example would be interpolated to:

<html>
  <body>
    Hey world
  </body>
</html>
Something went wrong with that request. Please try again.