Internet Explorer 10 not saving cookies when Roaming Profile used

Have just upgraded my Windows Server 2008 R2 XenApp 5.0 servers from IE 9 to IE 10 and noticed that cookies were not working after a logoff. Everything was fine whilst the user was logged on, so cookies were working within that Windows session. But log off Windows and log back on again and any website settings stored in cookies were lost.

The cookies themselves default to the following folder:


(the Low folder is assuming you run IE in Protected mode, which you should)

If you use the AppData(Roaming) Folder Redirection Group Policy setting to redirect the Roaming folder (which you should) then the folder will obviously end up in a folder down the path you specified instead.

The cookies themselves are just .txt files with eight character hexadecimal names, and do get stored in the Cookies folder, but you’ll notice that they’re not read when you log back on to Windows, instead new cookies are created.

This is because as of IE 10 there’s a different format and location for the database that keeps track of which cookie file to use with each website you visit. This file lives here:


As you may know, the whole of the AppData\Local folder gets deleted when you log off, if you have a roaming profile.

The workaround to make cookies work is to set a Group Policy Preference to set the following registry value:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Local AppData

to point to a user folder on a file server, possibly a subfolder of the one where you already redirect the AppData(Roaming) to. The folder you specify will be created when the user logs on.

Note that the initial size for the WebCacheV01.dat file is about 33MB, so if you have a lot of users you might want to monitor the space usage on your file server more closely for a while after making the above change.

Also, you shouldn’t end up with all your Temporary Internet Files being redirected as these will stay in the Local part of the profile thanks to the registry value:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Cache

which points specifically to a folder within the %USERPROFILE%\AppData\Local folder structure.

Likewise the Temp folder, %TEMP% environment variable, also references %USERPROFILE% in the registry value:


so the user Temp folder also stays on the C: drive.

Also, I’ve not had this running live in my environment for long, so there may be undesired side effects that I’ve yet to notice. If you find any please let me know!

Update 2014-02-06

Have been running this with no strange side effects (that I’ve been made aware of), I have  several thousand users. The only downside (as mentioned above) is that if your storage is tight, each user will end with a copy of the ~33MB database file – but that’s not a problem with the workaround, it’s just how IE has been designed. You’ll get the same file stored on any machine running IE10 (or 11). And you’d get the same issue if the WebCacheV01.dat file had been stored in the Roaming part of the profile anyway.

Tip: Use a Windows 2012 (or higher) file server to hold the redirected application data and turn on data deduplication – these database files dedupe quite spectacularly – especially when they’re new as they’re mostly empty.

This entry was posted in Remote Desktop, Windows and tagged , , , , , , , , , . Bookmark the permalink.

8 Responses to Internet Explorer 10 not saving cookies when Roaming Profile used

  1. Andrew Duffin says:

    Excellent, worked a treat, thank you very much.


  2. Mikey says:

    Is it possible to only redirect the webcache folder? (not all other setting in Local AppData)?


    • rcmtech says:

      No, you’re limited to the locations shown in the User Shell Folders registry key.


    • Joan Bamps says:

      When using xenapp and roaming profiles you can redirect the webcachefolder in the group policy settings :
      Admin templates – Citrix/Profile Management/File system/Synchronization
      Directories to synchronize – enabled


  3. qbone187 says:

    When is use this script the cookies are saved and thats great. only cutepdf doenst work anymore!


  4. dirk says:

    Does it work under XENAPP65 different? Under AppData is only the item roaming. No folder local exist.


  5. Lal Mohan says:

    Reblogged this on Citrixology.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.