Simon Willison’s Weblog


Accessing cookies with application/xml+xhtml

3rd July 2003

I’m completely stuck on this one. When serving XHTML documents to Mozilla as application/xml+xhtml, the available DOM is for an XML document rather than an HTML document. This means it’s missing the document.cookie object normally used to access cookies from Javascript. I can’t figure out how you access cookies without it (I’ve searched Bugzilla to no avail). Anyone got any ideas? I sure wish the Mozilla project provided better documentation on this stuff.

This is Accessing cookies with application/xml+xhtml by Simon Willison, posted on 3rd July 2003.

Next: Nail, Bang, Head

Previous: web site tips

Previously hosted at