Advanced Cookie Management

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
CharmCityCrab

Advanced Cookie Management

Unread post by CharmCityCrab » 2015-11-30, 20:49

Right now, a user has several options with automatic cookie management on Pale Moon (and most browsers):

1. Keep the cookies until the cookies themselves say they expire
2. Have the browser clear cookies at the end of each browser session
3. Use an extension to clear cookies every time you close a tab

This seems like an all or nothing approach. Essentially, one either lets cookies stay until the end of time if they want to, or gets rid of them constantly requiring reentry of passwords and resetting of options and such all the time.

What if we had an option like "Retain each cookie for 30 days after it appears and then delete it"?

That way, users could choose to have the convenience of cookies saving their options and keeping them logged in across many user sessions, but don't wind up with an unmanageably large number of cookies dating back many years.

30 days was just an example option. We could make it 90 days. Or 180 days (approximately 6 months). Or any other number. :)

CharmCityCrab

Re: Advanced Cookie Management

Unread post by CharmCityCrab » 2015-11-30, 21:06

This would differ from a user a clearing all cookies manually every 30 days because it would:

1. Be automatic
2. Have each cookie clear 30 days from it being placed, thus having cookies not clear all at once leaving the user to log back into everything and reset options and such all at once, but rather one by one according to a graduated schedule based on when the user first acquired each cookie, minimizing disruption to user work flow and routine by not having everything happen at once.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Advanced Cookie Management

Unread post by coffeebreak » 2015-11-30, 23:07

You can get this by adjusting 2 preferences in about:config --
network.cookie.lifetimePolicy >> 3
network.cookie.lifetime.days >> 30

( Mozillazine-KB give all the values btw. )

Or use a cookie management add-on like Cookiekeeper which provides a gui for doing this and also for editing individual cookies.

ashdav

Re: Advanced Cookie Management

Unread post by ashdav » 2015-12-01, 00:12

To manage cookies I personally use CCleaner. Available from here http://www.piriform.com/ccleaner/builds
I recommend the slim version (no rubbish/crapware, usually comes up 3-4 days after a release).
You can choose which cookies to delete or keep (login,settings,etc). It's accessible from the Tools option.

Tharn

Re: Advanced Cookie Management

Unread post by Tharn » 2015-12-01, 04:30

The most elegant way I've found is to do 'Accept cookies from sites' .. 'until I close Palemoon'. Then you can go into 'Exceptions' and set exceptions. 'Allow' overrides the default by making cookies last until they expire, 'Block' obviously blocks them right away. I have about two dozen trusted websites that get permanent cookies, the rest get session cookies. Google is blocked. ;)

It just takes a couple of minutes to set it up. No further management needed.

jumba

Re: Advanced Cookie Management

Unread post by jumba » 2015-12-01, 07:09

I would like to be able to differentiate a useless/tracking cookie from cookie that is required for example on login.

Something like this way:
3rd party cookies: block
site that is in passwords manager: accept
any other site: block

Tharn

Re: Advanced Cookie Management

Unread post by Tharn » 2015-12-01, 10:53

Just un-check 'Accept cookies from sites' and put in your list of exceptions?

superA

Re: Advanced Cookie Management

Unread post by superA » 2015-12-01, 20:55

Tharn wrote:Just un-check 'Accept cookies from sites' and put in your list of exceptions?
Yes, but then, you have to tell Pale Moon, not clear anything on exit, otherwise, your list is gone!

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Advanced Cookie Management

Unread post by coffeebreak » 2015-12-02, 03:27

superA wrote: Tharn wrote:Just un-check 'Accept cookies from sites' and put in your list of exceptions?

Yes, but then, you have to tell Pale Moon, not clear anything on exit, otherwise, your list is gone!
  • [emphasis added]
No, it doesn't work that way. Your list will be ok, no matter if cookies are checked to be cleared or not.

You just have to tell Pale Moon not to clear your Site Preferences on exit. The setting to clear cookies and the setting to clear the list of cookie exceptions are independent of each other. The exception list is treated as a site preference. So long as 'Site Preferences' are unchecked in Settings for Clearing History (and in Clear Recent History) the exception list is retained. It's not affected by whether cookies are checked / cleared. The back end preferences involved are:
  • privacy.clearOnShutdown.siteSettings >>> false
    privacy.cpd.siteSettings >>> false
( The 2d setting is for clearing recent history. )
superA wrote:Yes, but then, you have to tell Pale Moon, not clear anything on exit...
Actually if your default is either to deny all cookies, or accept all for session only -- modified by exceptions --
wouldn't you want to uncheck 'clear cookies' anyway to protect the white-listed cookies (not the list, the cookies)? At least I do.

CharmCityCrab

Re: Advanced Cookie Management

Unread post by CharmCityCrab » 2015-12-02, 04:35

coffeebreak wrote:You can get this by adjusting 2 preferences in about:config --
network.cookie.lifetimePolicy >> 3
network.cookie.lifetime.days >> 30

( Mozillazine-KB give all the values btw. )

Or use a cookie management add-on like Cookiekeeper which provides a gui for doing this and also for editing individual cookies.
Thanks. I'm trying out CookieKeeper and it seems to be exactly what I was looking for. Slight compatibility issue on my backup browser, but works like a charm on Pale Moon, which is the browser I actually use. :) Extendability is a real strength of Pale Moon, for sure.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Advanced Cookie Management

Unread post by coffeebreak » 2015-12-02, 05:42

CharmCityCrab wrote:Thanks. I'm trying out CookieKeeper and it seems to be exactly what I was looking for.
Glad it's working out for you. :)

wildchild

Re: Advanced Cookie Management

Unread post by wildchild » 2015-12-12, 16:21

I do not have any options for automatic cookie management in Preferences/Privacy for Palemoon 25.8.1 for Linux. The only thing I can do is removing all or individual cookies by hand. Are they only available in the Windows version?

dark_moon

Re: Advanced Cookie Management

Unread post by dark_moon » 2015-12-12, 16:54

You need to open the options with select "use custom settings"

Lord_Brezel

Re: Advanced Cookie Management

Unread post by Lord_Brezel » 2016-01-29, 02:48

Addon called self destructing cookies combined with a tracking blocker is pretty good and gives you only a small click burden

CharmCityCrab

Re: Advanced Cookie Management

Unread post by CharmCityCrab » 2016-01-29, 03:28

Revisiting this thread from a while back, seeing that someone has bumped it, I figured I should probably toss in that I had some problems with Cookie Keeper and replaced it with Self-Destructing Cookies. So, if you're just reading this for the first time and trying to choose between the two, I'd say don't repeat my mistake, and instead try SDC first. Although, for all I know, in a month I'll be back here saying that didn't work out for me either and now I'm on to some third thing or I've given up. ;)

van p
Astronaut
Astronaut
Posts: 595
Joined: 2015-11-19, 07:15
Location: Cincinnati, OH, U.S.A.

Re: Advanced Cookie Management

Unread post by van p » 2016-01-29, 07:04

I don't know tech from Shreck, so I figure if I know something, everybody knows it, or at least should. So I think the following info is pretty basic, but for anybody who doesn't know, here it is. There may be lots of products that allow cookie management; like ashdav, I use CCleaner (actually, it's "Options", not "Tools", but, I'm sure you could find it).

Looking through the posts, there's a certain degree of complexity in what some people want to do and disagreement about how some things work. CCleaner is a simple, manual process. Prior to running the cleaning process, individually select which cookies to keep/delete. For all the web sites I go to on a frequent basis, I've moved those cookies to the "Keep" box. The rest stay in the "Cookies on Computer" box; these disappear when I run the cleaner. This ensures that you won't lose site page designs, preferences, etc. Even without this aspect of the issue, there's no point in deleting cookies that will re-appear on your computer every time you go to a particular web site.

How to know which cookies go with which site? Start with a clean cookie slate, then go to each site one at a time, then to CCleaner's cookie window to see which new cookies appeared. Then move those cookies to the "Keep" box. Also, some cookies are generic and show up in lots of sites, so no point in deleting them. Again, this is simple brute force, but you can identify the cookies that will always be on your computer. To a certain degree that will change as the web sites change, switch advertisers, etc., and I'm sure I have cookies that no longer would currently be placed on my computer, but I guess I can live with that.

So usually once a week I clean my computer. Part of that process is CCleaner. I go to the cookies location and look through the new cookies that appeared in the last week. Any new ones that I can identify as something that will keep re-appearing on my computer, I move to the "Keep" box. Again, the rest will be deleted when I run the cleaner.

I'm not a cookie "purist". Most of what we do on the web is free, so I can't complain if somebody wants to put a cookie on my machine, especially if it benefits me (like with page preferences--for example, igHome, my successor to iGoogle, as my home page). Also, far as I can tell, I've never been harmed by a cookie. (There was a girl once named Cookie, but, well, never mind.)
Windows 10 Pro x64 v22H2 8GB i5-4570|Pale Moon v33.0.2 x64