3 Methods for Improving Your Page Speed with Episerver
Dustin Sier#Episerver, #Digital Strategy

We’ve all been there. We’ve got this immaculate website built out and ready to show to a client. It’s beautiful, it's intuitive…and it takes 30 seconds to load.
We’ve all been there. We’ve got this immaculately designed and orchestrated site built out and ready to show to a client. It’s beautiful, it's intuitive…and it takes 30 seconds for the page to load. That’s not good! Thankfully, Episerver provides some great things to help out of the box. This makes it easy to implement the strategies we’ve mentioned in the past and allows for other methods to help in improving page speed performance.
1. Episerver caches pages by default
Welcome to the easy world where Episerver automatically implements the caching of objects tied to page and block types. Any property that is maintained via the Episerver editor interface is already cached and updated as-needed by the system. No special help needed there for you!
2. Episerver gives you fine grained control over static file caching
Turns out, static file caching is already setup, enabled, and controlled via configuration settings in your application. You can manually determine the expiration time for any static file. Details can be found on the Episerver World site.
3. Be careful with calculated fields!
Calculated fields are those things that are determined or calculated at run time. Generally, it’s a good idea to avoid using calculated fields in Episerver page definitions. Instead, I would recommend using ViewModels for any calculated field. This helps you separate your concerns and more easily triage any errors that pop up. In the case of most calculated fields, implementing a caching strategy to handle those calculated fields. This can really help with page load and page speed issues. This is even true when you’re using default Episerver APIs. Here’s an example:
private EPiServer.IContentRepository _contentRepository = ServiceLoca-tor.Current.GetInstance();
private IEnumerable FindReferences(PageData page)
{
string cacheKey = string.Format("FindReferences:{0}", page.ContentLink.ID);
IEnumerable pageReferences;
if (!_objectCache.TryGet<ienumerable>(cacheKey, ReadStrategy.Wait, out pag-eReferences))
{
var references = _contentRepository.GetReferencesToContent(page.ContentLink, true).ToList();
pageReferences = references.Select(x => _contentRepository.Get(x.OwnerID));
_objectCache.Insert(
string.Format(cacheKey, page.ContentLink.ID),
pageReferences,
new CacheEvictionPolicy(new TimeSpan(10), CacheTimeoutType.Absolute)
);
}
return pageReferences;
}
Page speed in Episerver turns out to be easy. The default CMS provides excellent caching around user managed entries and with some simple caching steps, you can increase even the most troublesome pages with calculated fields. How have you improved your page speed with Episerver? Let us know below!
Have questions or comments about this post? We'd love to hear from you.
Related Posts

3 Things To Remember When Working To Improve Website Performance
We share some of the insights we gained by working on a redesign that would reduce page load time for a client's product pages.

An Ektron Developer Learns Episerver, Part 2
We continue our in-depth look at how Ektron developers can get the most out of Episerver, discussing content Pages and Blocks.
Website Traffic Woes?
Google search algorithm updates can wreak havoc on your website’s traffic. Don't let your organic rankings tank. Our free SEO health check can help you identify issues that make Google unhappy with your site.
Like what you read?
Subscribe to our blog "Diagram Views" for the latest trends in web design, inbound marketing and mobile strategy.