IE8 Cookie problem
October 8th, 2009 | by Sean |It’s 3am, so this will be brief. Firefox, Opera and Google Chrome are all happily accepting HTTP cookies from wossis.com, but IE8 was gaily ignoring them. The problem is speech / quotation marks in the Set-Cookie line:
Set-Cookie: MIFS=”qVZziOA7″; Path=”/”
…works in 3 out of 4 browsers. IE8 pretends it never saw it.
Remove the quotation marks:
Set-Cookie: MIFS=ngv_Aesy; Path=/
…and IE8 will recognise it. I do vaguely remember reading in RFC2109, the bit about:
10.1.3 Punctuation
In Netscape’s original proposal, the values in attribute-value pairs did not accept “-quoted strings. Origin servers should be cautious about sending values that require quotes unless they know the receiving user agent understands them (i.e., “new” cookies).
…but was still surprised (for hours!) that IE8 wasn’t accepting a cookie that was acceptable to the other browsers. If this problem crops up for you, I hope you read this well before 3am.