On Wed, Aug 09, 2006 at 11:59:29AM +0200, Anthony Chaumas-Pellet wrote: > Hello, Hello > > I've been enjoying ELinks for some weeks now - 0.11 from Debian, and > now 0.12 checked out from GIT (yay for UTF-8 support! Very sturdy now, > in my experience). My one problem is with cooking up cookies the way I > like them. > > The setting I currently use for cookie permissions is 1, aka "prompt > user at all times". While this setting keeps unwanted cookies out, it > can get annoying on some sites. My current record is of fourteen > cookie prompts in a row, a little too much for my tastes; bulletin > boards also seem to update cookies very frequently, thereby opening up > more prompts. > > I have tried setting the cookies I want, and then setting the cookies > permissions to 0, with no further cookie accepted. This trick does > work on some websites requiring cookies, but fails on the phpBB site I > use, and isn't particularly elegant. So, I would like to handle > cookies on a per-domain basis, with a few domains going into the white > list, and all other cookies getting rejected (Konqueror does something > like that). > > Does anybody have pointers on how to best achieve domain-based cookie > permissions ? There does not seem to be any such function through > browser scripting, and I haven't done much more than glimpse at the > source code yet (not that I'm much good at C) My suggestion is: Add the scripting hook accept_cookie(name, value, domain) for cookies approval with return value one of: - accept (0) - reject (1) - ask (2) - default (3) /* the same as ELinks without the hook */
Because running this hook for every cookie may causing slowdown it would be triggered only when cookies.accept.policy == 3. Then it will be up to the user to write the script for accepting cookies. What do you think? -- Witek _______________________________________________ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users