Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a way to automatically accept a cookie with a specific name, not based on site. The expected behaviour would be to block all cookies, unless its name contained foo in which case I would allow that cookie.

Most browsers give me an ability to reject all cookies except for an exemption list which can be set to automatically allow. However, the exemption lists all seem to be site based like so (Firefox 9.0.1);

Cookie Site Exemption

Does anyone know of an add-on or otherwise which can allow cookies by Name? This question is kind of the inverse of another Super User question which was resolved without blocking a cookie name: Firefox: how to block cookies by name, not by site?

Mock up of desired functionality;

Cookie Name Allow Mockup

share|improve this question
    
I do realize that exemption by Cookie Name is a security issue. Security through obscurity and what not. I am just wondering if it is possible / has been done before. –  krondor Jan 14 '12 at 0:56
add comment

1 Answer

up vote 1 down vote accepted

I have been looking into a similar matter regarding cookies recently, but I didn't find and good Firefox add-on that can do this.

What you can do is to write a Greasemonkey script that deletes all cookies except the one(s) with the name you want.

share|improve this answer
    
Yeah I was worried that would be the case, though I hadn't thought of using greasemonkey. Interesting work around. –  krondor Jan 14 '12 at 0:53
    
I've left this open a bit and haven't seen any other ideas. I've accepted the greasemonkey workaround as the answer. Thank you for the idea! –  krondor Jan 25 '12 at 15:21
    
You're welcome :) –  billc.cn Jan 25 '12 at 17:11
    
Having accepted this: Have you written/found such a script meanwhile, and maybe would make it public? I'm interested in the very same topic, just the other way around: having discovered that some proxies "inject" cookies (which they claim to come from the visited site, google for "BCSI-CS- cookie" for details), I want to automatically reject those. –  Izzy Mar 13 at 11:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.