Browser Problems with the XML Prolog

Using the XML prolog in XHTML documents is a practice that is recommended but not required by the W3C. So, it's up to you whether to use it or to leave it out. Here's an example of what the prolog looks like:

<?xml version="1.0" encoding="UTF-8" ?>

Some browsers have difficulty upon encountering the XML Prolog. In some cases, the browser will render all the markup as text. In other cases, when a browser has some XML support, it might attempt to render the document as an XML tree. To avoid these problems, many practicing web professionals prefer to leave the prolog off. This table will help you make that decision by showing you which browsers have known problems with the XML prolog.

Browser Type & Version Problems with XML Prolog
Amaya 3.1 No
Lynx 2.8.1 No
Internet Explorer 3.0, Windows No
Internet Explorer 3.0, Macintosh Yes
Internet Explorer 4.0, Windows No
Internet Explorer 4.0, Macintosh Yes
Internet Explorer 4.5, Macintosh Yes
Internet Explorer 5.0x No
Internet Explorer 6.0 Potential Compliance Mode problems due to DOCTYPE switching
Mosaic 3.0 No
Netscape 1.0 Yes
Netscape 2.02 Yes
Netscape 3.04 Yes
Netscape 4.0 Yes
Netscape 4.01 Yes
Netscape 4.02 No
Netscape 6.0+ No
Opera 3.21 No
Opera 3.51 No
Opera 3.60+ Some problems reported
Mozilla Some problems reported with certain builds

Credits: The information in this table was compiled from testing performed by members of the XHTML-L discussion list.