Allan Thraen
Apr 4, 2011
(3 votes)

Going Cookie less with EPiServer CMS

Over the weekend I found some time to look more into the much discussed cookie directive – and at the same time think some thoughts about how we can still leverage personalization to make a great user experience on a web site without bothering visitors with accepting a bunch of “Allow Cookie” popups.  As so often before, I ended up putting my thoughts into code which you can find on my other blog -

I will here share some of the essentials in case you are ever in need of a web site without cookies.

In essence I found it fairly easy to replace the Session State ID mechanism in ASP.NET with my own provider that doesn’t rely on cookies or messed-up URLs – but simply takes a fingerprint of your browser configuration and IP in order to determine your unique session. It seems to work fairly well, and now I even made a few zip-packages you can use with EPiServer CMS. Just put the assembly in the bin folder of your site and add the attribute sessionIDManagerType="EPiServer.Research.NoCookies.CookielessIDManager, CookielessSessionID" to the sessionState tag in your web.config.

Download the binaries here or the source here.

I have only tested this with CMS 6 R2 RTM – but I see no reason why it shouldn’t work all the way back to CMS 5.

This takes care of the ASP.NET Session cookie – while still allowing you to use session state. Session state is among other things heavily used in many of the new built-in criteria for personalization in EPiServer CMS 6 R2. It does not, however, remove any cookies that has already been sat, or replaces any custom cookies (or other EPiServer cookies) on your web site. These are some of the other cookies I often see at an EPiServer site:

  • EPi:NumberOfVisits – this is used if you are using the “Number of Visits” criterion. Remove it from all your visitor groups, and this cookie won’t be set.
  • If you have installed EPiTrace, Live Monitor or EPiServer CMO / LPO there’s also a number of cookies that will be set in order to track visitors.
  • Google Analytics – these cookies are almost everywhere
  • Cookies like ‘.EPiServerLogin’, ‘EPiDPCKEY’, ‘.ASPXRoles’ and probably a few more – these are cookies that are only used if you log in on a site. Not such a big problem as long as you clearly state on the login page that cookies will be used if you log in.


I hope you’ll find this information helpful.

Apr 04, 2011


Jonathan Sewell
Jonathan Sewell Apr 8, 2011 11:15 AM

I wonder if the directive will be more general and require that users give consent for any mechanism that is accessing their information, identifying them, or tracking them?

Another interesting way of storing session information....check out line 38 of this polyfill.... (using in IE)

Apr 12, 2011 07:16 PM

Nice idea and answer to the question about cookies for people who are concerned. :) Dec 20, 2011 05:53 PM

Jonathan is correct - the directive is aimed at tracking - not just at cookies.

From "Guidance on the rules on use of cookies and similar technologies" by the ICO.

The Regulations apply to cookies and also to similar technologies for storing information. This could include, for example, Local Shared Objects (commonly referred to as “Flash Cookies”), web beacons or bugs (including transparent or clear gifs).

Please login to comment.
Latest blogs
IDX21323 - RequireNonce is true, Nonce was null

We have multiple clients configured with Azure Active Directory (Microsoft Entra) for requiring authentication when accessing their website. The...

David Drouin-Prince | Oct 1, 2023 | Syndicated blog

Minimum Detectable Effect in Optimizely Web Experimentation

Understanding Minimum Detectable Effect Minimum Detectable Effect (MDE) is a core statistical calculation in Optimizely Web Experimentation. In...

Matthew Dunn | Oct 1, 2023 | Syndicated blog

Configured Commerce - Introduction to Long-Term Support (LTS) Releases

First off, for those who have not had a chance to meet me yet, my name is John McCarroll, and I am the Technical Product Manager for the Optimizely...

John McCarroll | Sep 29, 2023

Auto-translate with OpenAI in Optimizely CMS

You can now auto-translate content using your favorite online AI service, inside the old trustworthy Episerver.Labs.LanguageManager!

Tomas Hensrud Gulla | Sep 29, 2023 | Syndicated blog