August 3rd, 2004


LJ Cookies

Greetings. I have several friends who frequently complain about getting logged out of livejournal periodically, even though they have their expiration set to "Never." Today I decided to dig in and try to figure out what's actually going on. I'm not there yet, but I have a few cookie related questions.
  1. I grepped around for the code that handles cookies, and I discovered that when you choose "Never" log me out, it actually only sets the cookie's expiration date to 60 days in the future. That's not quite "never". While the database's session expiration is extended regularly [, line 3938], the cookie never seems to get updated. Why is this?

  2. I noticed that LJ::User::generate_session() (which is called by login.bml) uses 7 days instead of 60 days for "long" sessions [LJ/, line 127]. Is there a reason for this?

  3. Finally, what the heck is up with the Why can't I stay logged into LiveJournal, and what can I do to solve this problem FAQ? It contains weird suggestions like clearing your cache, switching back and forth between "when browser closes", and "never", logging in on the comment page rather than the login page, contacting your ISP, etc. Are these suggestions actually useful? There's all this weird stuff, but it doesn't even mention the 60 day expiration thing.

That's it for now. Thanks for any information you can provide.