Sunday, May 29, 2011

XML parsing failed - Opera

This mostly occurs with ASP.NET as it sets content type for opera as application/xhtml+xml.This error occurs in opera if you have any unescaped html special characters in aspx page Eg: & instead of & . Validate your page using W3C validator for any page errors. If it occurs for a existing large scale website. go ahead and fix it using browser config file hack.You will face this issue if you add browser config files from codeplex to detect mobile devices such as
In order to over come this issue. You need to set content type to text/html.
The best way to fix this issue is to add following code to .browser config file for opera in App_Browser file.

<capability name="preferredRenderingMime" value="text/html" />
<capability name="preferredRenderingType" value="html32" />
<capability name="SupportsXhtmlRendering" value="false" />

No comments:

Post a Comment