After carefully looking at the Secret Agent add-on and trying unsuccessfully to contact the developer because of an issue it has with clearing the general.useragent.override.<domain> preferences, plus it appears to sniff and modify EVERY HTTP request, I decided to attempt to develop a PM only alternative add-on. However, this is my first foray into this area and I would appreciate some help/guidance. I have been trying to find help by searching, but resources on developing an add-on seem to be scarce and/or clear as mud.
Specifically, at the moment, I need help for the following issues:
- 1) Is there a particular event that is fired when all tabs are closed? This would seem to be related to the browser.tabs.closeWindowWithLastTab preference. What I want is a way to tell if all active tabs/pages have been closed so only the home/start/blank page is active. I could try to keep track of what pages are opened and when they all are closed to do what I want in item 2 instead, but this seems chancy.
- 2) If such detection is possible, then is there a way to call whatever does the privacy.clearOnShutdown preference? What I want is to clear history automatically when I detect the event in my first item. This is to as unobtrusively as possible handle ETag fingerprinting by eliminating them when it is reasonable to do so - when no pages are currently active. This would also seem to be the most reasonable time to do a random user agent change.
- 3) A different approach would be if it is possible to eliminate all history (cache, cookies, etc.) of a specific domain when that domain is left, but I hold little hope for that. If such is possible, then I could selectively clear history when a domain is left.
I realize there are very sophisticated methods of browser fingerprinting, but as the default general.useragent.override.<domain> preferences shows, even the big guys like Google, Facebook, etc. aren't fully beyond using the user agent string.
Thanks for any assistance in advance. Even telling me it is a waste of time with a good explanation as to why would be appreciated!