2

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.

Andy T
  • 10,223
  • 5
  • 53
  • 95
  • My guess is a syntax error in your HTML. IE10+ seems to be a bit vindictive, as though it's slapping us all in the face for hating it for so long. It drops support for HTML<5 attributes, etc. Show us your code from the top of the page to where it gets truncated. – isherwood Jan 17 '14 at 16:54
  • I've seen the same issue on search based SharePoint sites. looking at them in fiddler you see no content is returned so its not just rendering. My thoughts were it may be strict against Javascript errors etc. – Lotok Jan 17 '14 at 16:54
  • 1
    Without being able to look at your markup, I'm wondering how we're supposed to deduce a solution? I'd guess the same as isherwood, though. Have you tried to validate the markup through a service that checks HTML Tidy (like http://www.dirtymarkup.com/)? – Jason M. Batchelor Jan 17 '14 at 16:55
  • I can understand how a syntax error would cause a problem with the DOM. However, even when I view source, which does not parse the HTML, I only get part of the HTML (from the server) – Andy T Jan 17 '14 at 16:57
  • 1
    Have you used a tool like [fiddler](http://fiddler2.com/) to see what is returned to the client? – epascarello Jan 17 '14 at 16:57
  • @epascarello Great advise! I just checked Fiddler and the server is returning the complete HTML. I viewed-source once a again (on IE 11) and I only get about a third of the markup – Andy T Jan 17 '14 at 17:01
  • Now look at where the mark up ends. Look at the result from the fiddle, does something look wrong? Take the full code and validate it at W3C is there any errors? – epascarello Jan 17 '14 at 18:33

2 Answers2

3

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.

Community
  • 1
  • 1
Andy T
  • 10,223
  • 5
  • 53
  • 95
0

I have the same problem in IE 11.0.9600. And figured it out if the webpage is loaded in the compatibility view, the data is not complete. However, if it is NOT in compatibility view (Settings/Compatibility View Settings, remove the domain), problem solved, and all my $().find() works okay.

Simon Suo
  • 1
  • 3