A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

K Khan
Jun 19, 2019
  6707
(6 votes)

Best practises cheat sheet for your EPi site

  • Prefer Controllerless blocks
  • Don't Create Content Areas in Blocks, No nesting blocks.
  • Minimize database calls. Instead, use Episerver’s caching layer where ever possible.
  • Personalization might have an impact on performance, therefore make sure you implement personalization in a way that has the least possible impact.
  • Avoid frequent querying of the Dynamic Data Store.
  • Try to keep your content tree well balanced.
  • Prefer Lists over ContentArea where possible to avoid big content structures for complex pages.
  • Avoid dynamic properties.
  • Register UIDescriptor, where you disable on page edit and preview views
  • For settings kind of pages, ensure that it will not have a template
  • Use Episerver’s Object Cache instead of .NET’s built-in cache
  • Create all Content Types (Page Types, Block Types, Media Types) in code
  • For property (field) names in code, use standard .NET PascalCase. Make sure to set a friendly Display Name and Description
  • Plan a data hierarchy for Content Types, and use class inheritance
  • Organize groups of properties (fields) into tabs
  • Provide an order of properties, with frequently used properties at the top of each tab, Consider Editors
  • Set default values for Content Types’ Properties (if known)
  • For media properties, use the ContentReference type and the appropriate UIHint
  • Use the PropertyFor method to render properties (fields) in Content Type views
  • Make sure to always create the appropriate Media Types for assets in the project
  • Use Container Pages for folder nodes, without presentation (if required) use IContainerPage.
  • Plan carefully the content structure hierarchy, and avoid overloading a single level with too many pages
  • Make sure to load-test external systems integrations
  • Avoid resolving URLs repeatedly, think about cache.
  • Avoid creating blocks to use for image refernces and pages only along with some text as Alt

Disclaimer: Points have been learned from many different sources and experience, have been adding in my best practices document.

Jun 19, 2019

Comments

Praful Jangid
Praful Jangid Jun 20, 2019 08:05 AM

Thanks for listing out the checklist for the best practice. I have some questions like

  1. Why you want to avoid creating ContentArea on blocks?
  2. When you are saying personalization may have performance imapact. Are you just talking in reference of chaching or something else?

Thanks, and regards

Praful

K Khan
K Khan Jun 20, 2019 09:17 AM

1- Having Content areas in blocks open a wormhole for nested blocks, I will prefer to avoid by default, will prefer to discuss with the team if it really requires and see if this can be avoided. 

2- e.g. Custom Visitor Group Criteria depending on 3rd party services, can secretly effect performance, It will be hard to investigate, should be taken care in advance.

/K

Daniel Ovaska
Daniel Ovaska Jun 20, 2019 12:28 PM

1. I agree. Content Area in blocks might seem like a flexible solution yes. It can however get very difficult for editors and does also have some performance drawbacks. If possible, avoid nesting blocks in blocks except in rare cases. It's like most things. Blocks are great...in moderation. 

KennyG
KennyG Jun 20, 2019 03:09 PM

What do you suggest instead of nested blocks? PropertyList?

Praful Jangid
Praful Jangid Jun 20, 2019 06:35 PM

Thanks K Khan,

I see now, that using Block may create issue if not used properly. And for personalization, I never know that there are critetia's that may be using a third party service.

K Khan
K Khan Jun 20, 2019 08:53 PM

KennyG,

https://world.episerver.com/documentation/developer-guides/CMS/Content/Properties/generic-propertylist/

I will just echo Daniel. He explained it well 

/K

Jun 21, 2019 07:52 AM

OMG, we must be twins, Khurram! 😉

Joke aside. I see that some of the key points regarding performance optimizations looks very much like points I very recently wrote on my personal blog (on June 2).

Maybe it is a coincidence, maybe it is copy/paste. But can we please refer or provide links, if we publicly use or refer to the written work of someone else?

K Khan
K Khan Jun 21, 2019 08:13 AM

You are right, I have added a disclaimer at the end of the blog (as it might cause offence, but I am afraid don't have references for those), This was the collection that I have been collecting from many different resources and was adding in my best practises cheat sheet from many years.

For me above link isn't working, we might be replicating here as generally, we all practise those. Glad you are also sharing your experience and learning.

This site can’t provide a secure connection

stefanolsen.com sent an invalid response.

ERR_SSL_PROTOCOL_ERROR

K Khan
K Khan Jun 21, 2019 08:35 AM

@Stefan, Looks like your site needs some attention and isn't available to a big audience.

http://stefanolsen.com (Look out! Your Virgin Media Child Safe settings have blocked this site)
https://stefanolsen.com/ (This site can’t provide a secure connection)
https://www.stefanolsen.com/ (This site can’t provide a secure connection)

K Khan
K Khan Jun 21, 2019 08:35 AM

@Stefan, Looks like your site needs some attention and isn't available to a big audience.

http://stefanolsen.com (Look out! Your Virgin Media Child Safe settings have blocked this site)
https://stefanolsen.com/ (This site can’t provide a secure connection)
https://www.stefanolsen.com/ (This site can’t provide a secure connection)

Paul Gruffydd
Paul Gruffydd Jun 21, 2019 12:52 PM

Just to pick up on  KennyG's point, I think the solution to avoiding nested blocks depends on what you're using them for. In some circumstances list properties are absolutely the right option but they also have drawbacks to be aware of in that items aren't reusable (or individually previewable), you can't apply personalisation, localisation is tricky (to put it mildly) and, as it says at the top of the documentation, they aren't officially supported.

One of my pet hates when it comes to nested blocks is to use them just to represent a containing element, for example grouping accordion blocks into an accordion container block. As well as the performance implications, this adds to the work editors have to do to maintain a site. My preferred approach in that scenario is to modify the content area renderer to look for items which should be grouped together (e.g. instances of AccordionItemBlock) and to inject the relevant markup around them.

KennyG
KennyG Jun 21, 2019 02:01 PM

Hey Paul that's an interesting approach to grouping in the content area renderer. Do you have a blog post or code sample detailing how you do that? I'd like to see that.

Paul Gruffydd
Paul Gruffydd Jun 21, 2019 04:15 PM

I'm afraid I don't have anything written up but, if people would find it useful, I might write up my approach as a blog post. If you're willing to pick through some code, Valdis takes a similar approach in his EPiBootstrapArea project here:

https://github.com/valdisiljuconoks/EPiBootstrapArea/blob/master/src/EPiBootstrapArea/BootstrapAwareContentAreaRenderer.cs

KennyG
KennyG Jun 24, 2019 02:19 PM

Hey Paul, I see you did write it up! Nice!

Jeroen Stemerdink
Jeroen Stemerdink Jun 27, 2019 08:09 AM

For more content related tips, have a look at my post here

Deepa Puranik
Deepa Puranik Jun 28, 2019 06:12 AM

Thanks for this useful checklist.

In which scenario using content area will be fine? Do we need to avoid it throughtout?

Deepa Puranik
Deepa Puranik Jun 28, 2019 06:12 AM

Thanks for this useful checklist.

In which scenario using content area will be fine? Do we need to avoid it throughtout?

Steve Horn
Steve Horn Nov 14, 2019 03:26 PM

This is a useful list. It would be very helpful to include a "why" statement after each suggestion as well as an alternative solution.

Please login to comment.
Latest blogs
Looking back at Optimizely in 2025

Explore Optimizely's architectural shift in 2025, which removed coordination cost through a unified execution loop. Learn how agentic Opal AI and...

Andy Blyth | Dec 17, 2025 |

Cleaning Up Content Graph Webhooks in PaaS CMS: Scheduled Job

The Problem Bit of a niche issue, but we are building a headless solution where the presentation layer is hosted on Netlify, when in a regular...

Minesh Shah (Netcel) | Dec 17, 2025

A day in the life of an Optimizely OMVP - OptiGraphExtensions v2.0: Enhanced Search Control with Language Support and Synonym Slots

Supercharge your Optimizely Graph search experience with powerful new features for multilingual sites and fine-grained search tuning. As search...

Graham Carr | Dec 16, 2025

A day in the life of an Optimizely OMVP - Optimizely Opal: Specialized Agents, Workflows, and Tools Explained

The AI landscape in digital experience platforms has shifted dramatically. At Opticon 2025, Optimizely unveiled the next evolution of Optimizely Op...

Graham Carr | Dec 16, 2025

Optimizely CMS - Learning by Doing: EP09 - Create Hero, Breadcrumb's and Integrate SEO : Demo

  Episode 9  is Live!! The latest installment of my  Learning by Doing: Build Series  on  Optimizely Episode 9 CMS 12  is now available on YouTube!...

Ratish | Dec 15, 2025 |

Building simple Opal tools for product search and content creation

Optimizely Opal tools make it easy for AI agents to call your APIs – in this post we’ll build a small ASP.NET host that exposes two of them: one fo...

Pär Wissmark | Dec 13, 2025 |