[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: saving cookies without remembering to type Q



jidanni@xxxxxxxxxxx writes:

> I'm just recalling looking in the cookie files of the various browsers
> I've used, and seeing all kids of rotting cookie goop from all kinds
> of bleccch sites that I visited, whereas I really only want to save
> cookies for a few sites...
>
> NA> How do you think about adding new variable, named
> NA> "w3m-cookie-save-domains"? If this is nil, emacs-w3m save all cookies,
> NA> else emacs-w3m only save cookies whose domain match this variable. I
> NA> think this solution is better than calling such function in each buffer
> NA> he/her want to save cookies.
>
> OK, sounds good. But also have a third value: 'already: only save
> cookies from sites that already have saved cookies.
>
> That way we won't need to list them explicitly in a variable, but
> instead can take advantage of this new command that you perhaps could
> implement and bind to some capital letters (below I call "magic
> keystroke") that are hard to hit by accident, but not as hard as
> typing M-x ...: Please implement a "w3m-save-cookies-current-site"
> function.

Added w3m-cookie-save-current-site-cookies, but not binded yet.

> The current site we are browsing's cookies (need at least one
> already downloaded this session) are saved to file.
>
> NA> I added new variable named w3m-cookie-save-cookies (default is t).
>
> And this would have a new value too: 'only-save-currently-saved-sites

I think this can be done by setting w3m-cookie-save-domains 'already.
This value only set whether or not emacs-w3m should save cookies.  What
cookies to be saved would be controled by w3m-cookie-save-domains.

BTW I found another (maybe better) solution.  Abolish
w3m-cookie-accept-domains and w3m-cookie-reject-domains, and add new
variable named "w3m-cookie-rule". This variable control whether or not
emacs-w3m use cookies, and whether or not emacs-w3m save them. Here is
the exsample.

(setq w3m-cookie-rule
       ;; accept and save cookies from good1.exsample.com
      '(("good1.exsample.com" accept-save)
	;; accept but doesn't save cookies from good2.exsample.com
	("good2.exsample.com" accept-nosave)
	;; reject cookies from bad.exsample.com
	("bad.exsample.com" reject)
        ;; accept and save cookies from sites whose cookies are already
        ;; saved
        (already accept-save)
	;; by default, accept cookies and save them according to the
	;; value of w3m-cookie-save-cookies
	("" accept)))                        

> And voila! All one needs to do is just once press a magic keystroke
> when browsing en.wikipedia.org, and one never needs to login again,
> not next week, not next month.*
>
> But as I never pressed that magic keystroke when using Google, I have
> no Google cookie tracking my every wish and desire for the Big Brother
> Man.

I think this can be done better by setting w3m-cookie-reject-domains.

> (Maybe there can be two variables, " 'already " and a second is a list
> where I can say *.wikipedia.org, so I can save all the wikipedia
> cookies without a magic keystroke on each site.)
>
>>> As far as M-x w3m-cookie goes, it is not clear from its interface if
>>> it saves to file or not, etc.
>
> NA> I have no idea about how I can make it better. Any suggestions are
> NA> welcome. :)
>
> Maybe add some introduction at the top, as the user wonders: "are
> these current or session or to be saved to file cookies? Why do I
> need to click twice to delete a cookie?... etc.

OK. I'll work on this.

> *Also add a button inside M-x w3m-cookie to cheat: to make those
> crappy one month Expires wikipedia cookies into PERMANENT cookies!
> Muhahaha: one-click and it becomes permanent: never have to login
> again! Or maybe add the ability to edit any cookie field. Yes, one
> could edit the cookie file by hand, true.

mm...I think that feature can cause some problems. I don't want to add
it.

Regards,

Naohiro Aota