Cookies

Just wanted to share a quick experience I had today. I have about 5 different browsers installed on my laptop (Firefox, IE7, Chrome, Opera, Safari), and today I was seeing some weird behavior. I work for a company, The American Academy, that uses Drupal for a lot of it's development. I was only able to sign in to the site using Firefox. None of the other browsers were working. When I would try to sign in, I got no errors, and it would try to redirect me as if I was logged in, but I wasn't. I cleared all of my cached data, and reinstalled all the browsers, and so forth...

I determined that cookies weren't be set as they needed (internet cookies are the way to track that a user has visited your site and keep small pieces of date about that user for when they return). The cookie that said I was logged in was being created only in Firefox, but not in any of the other browsers. After about a 3 hour excursion to find the answer, we found it.

Every 2 weeks or so my computer runs an update and changes the time back one hour from the actual time. That means that I have to manually change the time. This past time, it turns out that I changed the month ahead as well. Here is what it said:

It is certainly not November. It turns out that Firefox is the only browser that doesn't use the local machine time to handle cookies, and so it was working fine. All of the other browsers were setting the time of the cookie as if it was 3 months from now when I returned, meaning that I was automatically logged out. Changing the date back to September did the trick and I am back in business.

Comments

tysqui said...

That seems like a pretty random solution. I'm impressed that you were able to figure it out. molodets!