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
Customizing Property Lists in Optimizely CMS

Generic property lists is a cool editorial feature that has gained a lot of popularity - in spite of still being unsupported (officially). But if y...

Allan Thraen | Oct 2, 2022 | Syndicated blog

Content Delivery API – The Case of the Duplicate API Refresh Token

Creating a custom refresh provider to resolve the issues with duplicate tokens in the DXC The post Content Delivery API – The Case of the Duplicate...

David Lewis | Sep 29, 2022 | Syndicated blog

New Optimizely certifications - register for beta testing before November 1st

In January 2023, Optimizely is making updates to the current versions of our certification exams to make sure that each exam covers the necessary...

Jamilia Buzurukova | Sep 28, 2022

Optimizely community meetup - Sept 29 (virtual + Melbourne)

Super excited to be presenting this Thursday the 29th of September at the Optimizely community meetup. For the full details and RSVP's see the...

Ynze | Sep 27, 2022 | Syndicated blog