Exporting and importing cookie blocklists into IE

I block cookies, and so should you! If you every want to be shocked by how much crap people put on your PC you should (in Internet Explorer atleast) turn on these settings in “Tools > Internet Options > Privacy > Advanced”

Once you have done this you will quickly become annoyed, like most of the people who ever find themselves behind either my laptop or home PC, by the amount of cookies you will have to block. Now once you have done this you will quickly build up a list of hundreds of sites you want to block, maybe even thousands. But while IE has a very nice method of importing all these sites, which you can find at http://msdn.microsoft.com/en-us/library/ms537344(v=VS.85).aspx , there is no actual GUI method of exporting this list. However the list is stored on your registry., at the following place:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History

If you go here and export the entire substructure from here you will end up with looking like this:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History\2o7.net] @=dword:00000005
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\P3P\History\microsoft.com] @=dword:00000001

Making the quick conclusion that reject = dword:00000005 and accept = dword:0000001. We can quickly use anything like program like EditPlus or even notepad to shape this into the proper XML syntax required by the import tool.

  <MSIESiteRules formatVersion="6">
   <site domain="2o7.net" action="reject"></site>
   <site domain="microsoft.com" action="accept"></site>

Hopefully this will help people, and system administrators, implement a more strict anti-cookie policy. Especially here in the EU it is nice to still run this type of scheme, because even if a site will force you to accept all their cookies in their pop-up most of them do not actually check if the cookie itself is set.

Leave a Reply

Your email address will not be published. Required fields are marked *