Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

Delete cookie without exception

more options

I created own firefox extension that remove all firefox cookies.

this is code:

Components.classes["@mozilla.org/cookiemanager;1"]

     .getService(Components.interfaces.nsICookieManager).removeAll();

How can I remove all cookies without one site exception with cookie manager function?

I created own firefox extension that remove all firefox cookies. this is code: Components.classes["@mozilla.org/cookiemanager;1"] .getService(Components.interfaces.nsICookieManager).removeAll(); How can I remove all cookies without one site exception with cookie manager function?

Toutes les réponses (5)

more options

I only see two methods there: remove and removeAll: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsICookieManager

Perhaps you could save the details of the cookie you do not want to delete and use either add or import to restore it after you removeAll?

https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsICookieManager2

more options

Can You write function wchich will save one exception and add it after delete all? ;)

more options

Not me personally, sorry.

more options

Could someone help?

more options

Or, since this isn't really a support question, try the mozillaZine Extension Development forum.