Andrés Nava - .NET Andrés Nava - .NET - 4 months ago 23x
jQuery Question

Incomplete HTML in IE 11

I am working on a site that does not render in IE 11, but works fine in every other browsers.

When I debug it using F12 Developer Tools, the DOM is essentially empty except from the header section. When I view the source code, it only returns the header section and part of the navigation.

However, when I add the site under

Compatibility View settings
the page renders correctly, but then causes other problems.

I would like to fix the underlying issue rather than require users to add to Compatibility Mode or have to set the x-ua-compatible header tag.

I cannot think what would cause it to only have a portion of the HTML sent from the server. When I "View Source", it's not like it is parsing the HTML to create the DOM or running any JavaScript. It is simply suppose to show the HTML that the server sent down.


After further debugging, I was able to determine that requests made on IE 11 were returning with a content-type set to application/xhtml+xml instead of text/html.

Tracking down the cause of this problem lead me to the culprit: mobile.browser file in App_Browsers

Once this file was deleted, my requests were now returned with the correct content-type and IE 11 was able to render the page without a problem.

Hope this helps others.