[Tutor] Advice on working with Firefox's cookies.sqlite
dn
PyTutor at DancesWithMice.info
Sat Jun 27 19:26:02 EDT 2020
On 28/06/20 10:41 AM, Alan Gauld via Tutor wrote:
> On 27/06/2020 20:02, Jim wrote:
>> When I get a chance I'll try shutting down just the normal one and see
>> if that helps.
>
> I'll be surprised. All instances of firefox will use the same
> cookie database. If it gets deleted they will just regenerate
> it using the in-memory cache. They are using sqlite as a
> persistence mechanism not a database. Its table structures
> are used just as a useful data format and to provide basic
> multi-session access/locking control.
>
> But so long as there is a single instance running you probably
> can't even guarantee that changes made by the other instances
> (let alone any external program) will stick.
+1 "Persistence", except that there is a periodic (by config-setting)
update/backup.
Exactly! The live system is not continually/regularly re-reading the
'database' because it already (thinks it) 'knows' what's going-on.
The problem is ultimately one of 'ownership'. If it is 'my' data, I will
decide the who/what/why of access, etc!
FF does *not* expect (or want?) to share these records with anyone or
anything else. Accordingly, they have not been designed for multi-access
(per a regular RDBMS). Yes, if the relevant FF instance (see below) has
been closed-down, and the files are altered, this idea may succeed, but
once-again, that would be doing something most likely to be outside of
any FF design considerations - here be dragons!
(further to previous-post, above)
There *may* be different 'databases' - because FF works from a "profile"
and can be made to configure itself from multiple profiles on the single
machine/OpSys - thus in the days when PCs were often shared, different
students could use the same machine but keep their data separate, 'his'
and 'hers' at home, and so-on. Largely unused by most, but still
available/possible.
Finally, (yes, am showing-off here) the Firefox [Web] Developer Edition
(and quite possibly other 'special versions' of FF) install separately
and outside the usual system-wide context - (stated to be) primarily to
maintain separate settings, profiles, etc. So, the multiple versions of
Firefox not only have separate profiles but also keep them in a
different (default) location.
(Firefox can be instructed where to keep its profiles, should one not
wish to accept their default/recommendation)
Back to the OP:
I salute your brave efforts, and your intent to use Python. However, the
issues are more to do with FF than Python. Thus, you may find more help
and advice from MDN (the Mozilla Developers' Network).
There is an Add-on/Extension called Cookie-Editor which will list the
cookies relevant to the active tab/web-page, and gives one the
opportunity to delete them (and more). This is considerably more
accessible (and flexible - and revealing!) than using the Preferences |
Privacy and Security facility! I use it for controlling and debugging
the cookie side of web-dev 'all the time'...
At the sledge-hammer end of the tool-rack, it is possible to set Firefox
to wipe all cookies at the end of each session. This will definitely
counter any sneaky marketing efforts and 'tracking', but may also have
the effect of undoing the 'remember me' type of facility on sites where
you may wish to maintain a 'membership'...
--
Regards =dn
More information about the Tutor
mailing list