Quite often Opera users complain that their favorite browser cannot parse a web page and gives the following error:
Here are some examples of various sites (if they have not already been fixed): http://www.beautifulpeople.com/index/en http://gameinformer.com/games/singularity/b/pc/default.aspx http://cph.dk/CPH/DK/MAIN
Mind you, the sites are displayed correctly in other popular web browsers. They can be displayed correctly in Opera if you ask them to be parsed as HTML and not XML. (Click “Parse Document as HTML”).
So is it Opera that cannot parse XML or do other browsers chose to ignore XML in the page type and simply parse it as HTML? The answer is in the server’s response:
If the browser is Opera:
If the browser is Mozilla Firefox:
Turns out the server lies to some browsers. It can be said with a certain level of confidence that it does so based on the User-Agent line. If you set Opera to Internet Explorer or Firefox in “Browser Identification” – the pages are displayed correctly. The reverse is true as well – setting user agent to «Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)» in Safari causes the server to mark the content as application/xhtml-xml in which case Safari fails to parse the document.


