dgel
dgel

Reputation: 16796

Cookies working in Firefox and Chrome, not IE9

I have a page that sends the user's browser a session cookie after login. The login works fine in Chrome and Firefox, but not for IE9.

Using the F12 development mode of IE, I can see that the Set-Cookie header is being sent to the browser:

Set-Cookie: workgroup_session_id=abc123; expires=Sun,; Path=/

This is the Set-Cookie sent as a response header on Saturday night.

However, when IE9 makes the next response, it doesn't send the workgroup_session_id cookie (so it gets the login form again).

The same Set-Cookie is being sent to Chrome or Firefox, and as expected, they send the workgroup_session_id on the next request and everyone's happy.

Why would this not work with IE9? I am not using any strange security settings or plugins and other cookies work fine. Another client that brought the problem to my attention is experiencing the same behavior with only IE9.

I don't think this is a P3P related issue. It still occurs when I set my privacy setting to Accept All Cookies.

It also occurs even if I check Override automatic cookie handling and Always allow session cookies.

Upvotes: 1

Views: 1634

Answers (1)

John Dvorak
John Dvorak

Reputation: 27277

https://www.rfc-editor.org/rfc/rfc2616#section-3.3.1

The expires=Sun, header is not valid format (it's not obvious which sunday should be chosen).

Try sending expires in the form expires=Sun, 07 Dec 2012 00:00:00 GMT (as recommended by the RFC) instead.

Upvotes: 4

Related Questions