Private browsing - access cookies?

Talk about add-ons and extension development.
Post Reply
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Private browsing - access cookies?

Post by Vano »

Hello.

There is very limited information about private browsing in Firefox, and from what I could gather a temporary database for cookies created.
When private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated. The temporary cookie and local storage databases start out empty.
The question is, how can we access such database, specifically the cookies?

Thanks.
lithopsian
Posts: 3664
Joined: September 15th, 2010, 9:03 am

Re: Private browsing - access cookies?

Post by lithopsian »

The short answer is you don't. There are bugs about this, but I don't see any real interest in fixing them. I've had one open for nearly five years now and it is going nowhere. Mozilla doesn't see the need even for Firefox's own interface to display these, let alone giving an API to addons.

If you are desperate to see them then you can query directly from the private browsing content window (eg. document.cookies) and pass the info to your addon. You could use a frame script for this.
Post Reply