On page with MIME type application/xhtml+xml (and so very normative), the document.cookie variable is undefined, and we can't get any cookie from that page
Created attachment 15099 [details]
An xhtml file to perform test to see whether cookie work or not
The xhtml file allows you to click on a blue rect to check for cookies. First a message will be displayed giving the document.cookie value (undefined if cookies don't work).
Second, it will try to put something in cookie and then get what it put.
Then, a message will be displayed : the value of the cookie get (null if it don't work, "aValue" else).
This would be due to "cookie" being a property of HTMLDocument as per <http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-8747038>. In an XHTML document, "document" is an instance of Document rather than HTMLDocument so it lacks this property. I'm not sure that this can be considered a bug so much as a limitation of XHTML.
So it isn't possible to make a cookie using strict xhtml ?
This should be a big regression from html 4 (in fact, firefox has cookie with xhtml, it's possible it is not normative…) !
See also: bug 12628.
The current HTML5 draft specifies document.cookie for XHTML.
Fixed in revision 26078 (feature branch).