RESOLVED FIXED 14213
On page with MIME type application/xhtml+xml, document.cookie doesn't work
https://bugs.webkit.org/show_bug.cgi?id=14213
Summary On page with MIME type application/xhtml+xml, document.cookie doesn't work
François Lamboley
Reported Monday, June 18, 2007 2:07:09 PM UTC
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
Attachments
An xhtml file to perform test to see whether cookie work or not (1.73 KB, application/xhtml+xml)
2007-06-18 06:13 PDT, François Lamboley
no flags
François Lamboley
Comment 1 Monday, June 18, 2007 2:13:38 PM UTC
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).
Mark Rowe (bdash)
Comment 2 Monday, June 18, 2007 6:38:23 PM UTC
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.
François Lamboley
Comment 3 Wednesday, June 20, 2007 10:44:12 AM UTC
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…) !
Alexey Proskuryakov
Comment 4 Friday, June 22, 2007 12:49:29 PM UTC
See also: bug 12628.
Alexey Proskuryakov
Comment 5 Saturday, October 6, 2007 10:08:22 AM UTC
The current HTML5 draft specifies document.cookie for XHTML. Fixed in revision 26078 (feature branch).
Note You need to log in before you can comment on or make changes to this bug.