⚑
LiteSpeed

Using LiteSpeed ESI (Edge Side Includes)

πŸ“… 10 October 2026 ✏️ 10 October 2026 ⏱ 5 min leestijd

Discover how LiteSpeed ESI speeds up dynamic web pages by caching page parts separately, with explanation and practical steps.

LiteSpeed ESI (Edge Side Includes) makes it possible to largely cache dynamic pages after all by splitting them into blocks. Static parts such as a header or product list are served from cache, while personal blocks such as a shopping cart remain separate and uncached. This results in considerably faster loading times, even for pages that normally aren’t cacheable. In this article we explain how ESI works and how to enable it.

What is LiteSpeed ESI

Edge Side Includes is a standard in which a page is built up from multiple separate fragments, each with its own caching rules. Instead of caching an entire page as one piece (or not at all, because it contains dynamic content), ESI splits the page into blocks. The LiteSpeed server then reassembles these blocks at the edge (i.e., before the request reaches your application) into the final page.

An example: a webshop page contains a product overview that’s the same for everyone, and a shopping cart icon with the current number of items for the logged-in visitor. Without ESI, the entire page must be built dynamically as soon as it contains one personal element. With ESI, you simply cache the product overview and only fetch the shopping cart fresh per visitor.

Why use ESI

The biggest advantage of ESI is that you can still cache pages with personal or constantly changing content. Many CMS and webshop platforms (such as WordPress with WooCommerce, or Magento) have this kind of block: login status, shopping cart, recently viewed products, ads. Without ESI, these pages are often excluded from caching entirely, which significantly increases server load and load time.

With ESI, the majority of the page continues to come from cache, and only the small dynamic fragment is fetched separately. This saves processing time on the server and results in faster responses for the visitor. This difference is especially noticeable on sites with a lot of traffic and personalized content.

RequestLiteSpeed edgeBlock: cachedBlock: dynamicPage ready

Setting up ESI in Plesk

On a server with LiteSpeed and the LSCache plugin, you can usually activate ESI directly via your CMS’s caching panel, without manual server configuration. In Plesk, you’ll find the LiteSpeed settings under the extension for your hosting account, where you can enable caching and ESI support per domain.

1

Check whether LSCache is active

In Plesk, go to your domain and check whether the LiteSpeed Cache module is enabled for the website in question.

2

Install the right plugin

For WordPress, use the LiteSpeed Cache plugin, and for Magento or other platforms, the corresponding LiteSpeed module. These handle the ESI markup automatically.

3

Enable ESI in the cache settings

Within the plugin you’ll find a separate option for ESI. Turn it on and save the settings.

4

Mark dynamic blocks

Indicate in the plugin or via widgets which elements (such as shopping cart or login status) should be treated as an ESI block.

5

Test the page

Use your browser’s developer tools to check whether the dynamic blocks are displayed correctly and up to date, while the rest of the page comes from cache.

Applying ESI in your code

If you’re using your own application without a ready-made plugin, you add ESI tags manually in your HTML. An ESI include looks roughly like this: <esi:include src="/cart" />. LiteSpeed replaces this tag when serving the page with the current content of that fragment, while the rest of the page is simply served from cache.

It’s important to set clear caching rules per block: how long it may remain cached, and when it should be refreshed. For blocks that should never be cached, such as a payment form, explicitly disable caching.

πŸ’‘ Tip: Test changes first in a test environment before putting ESI live, so you’re sure personal data is never accidentally shared between visitors.

Not sure about the right configuration? Check our knowledge base for more background information about caching on LiteSpeed servers, or contact our support if you can’t figure it out.

Frequently Asked Questions

Does ESI work with every CMS?

Most popular platforms such as WordPress and Magento have ready-made support via a plugin. For a custom application, you need to add ESI tags yourself in the code.

Is ESI the same as page caching?

No, page caching caches an entire page as one piece. ESI splits a page into multiple fragments that are each cached separately or excluded.

Can ESI leak sensitive data?

Only if blocks are configured incorrectly. Make sure personal blocks, such as account details, are always marked as non-cacheable.

Do I need a special hosting package for ESI?

You need a server with LiteSpeed and the LSCache module. This is available by default on our web hosting.

Does ESI also work together with email hosting on the same domain?

Yes, ESI only affects the caching of web pages. Your business email continues to function completely independently of this.

Conclusion

LiteSpeed ESI makes it possible to largely cache dynamic pages as well by splitting them into static and personal blocks. This results in noticeably faster loading times without having to give up personalization. With the right plugin and careful settings, you can easily implement this, and in Plesk you’ll find all the necessary options neatly organized.

View web hosting β†’

Was dit artikel nuttig?