[Top][All Lists]

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

lynx-dev Wishlist item: semi-persistent session cookies

From: Ian Collier
Subject: lynx-dev Wishlist item: semi-persistent session cookies
Date: Thu, 10 Jan 2002 18:23:29 +0000


I'd like some way of not losing session cookies when I use
"lynx -source" to retrieve a web page.


I use "lynx -source" to download messages from Yahoo Groups so that
I can look at them later.  Unfortunately, Yahoo has started playing
games with session cookies in such a way that (a) each lookup takes
three redirects while the appropriate session cookies are set up, and
(b) sometimes Yahoo gives you an advertisement instead of the page you
wanted, and this can only be averted by supplying the session cookie
which was sent with the advertisement.

When lynx is used interactively, the concept of a session is well-
defined; it lasts until the user quits from lynx.  However, with "lynx
-source" the session begins and ends with the one web page which was
requested.  When a program uses lynx to fetch web pages, the session
properly ends when the program exits, and this could encompass several
calls to lynx.  But at the moment there is no way to accept session
cookies which are preserved from one invocation of lynx to the next.


When using "lynx -source" it seems that one needs an option which will
promote any session cookie to a persistent cookie.  The cookie need
only last a few seconds - just enough for the program to do its work
and exit.  (Of course, at the end of the session, which means at the
end of the program's execution, the program could discard the session
cookies by deleting the file where the cookies were kept.  This isn't
essential because the cookies, lasting only a few seconds, will have
already expired by the next time the program is invoked.)

I propose an option -session_cookie_timeout=NUMBER which (in conjunction
with the PERSISTENT_COOKIES and COOKIE_FILE options in lynx.cfg) will
make any session cookie last for the given number of seconds.


Just before each cookie is stored, if -session_cookie_timeout=N is
set and the cookie has no Expires flag, a "Max-age=N" attribute is
imagined: the Expires flag is set, and the time of expiration set
to N seconds from now.  I've tried this out and it works, but I haven't
supplied code as it's probably better done by the Lynx developers.

Ian Collier

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]