IE Browser Mode vs Document Mode for JavaScript - javascript

I have a .net web app that uses Telerik Reporting, and I'm having trouble running their new version on my intranet site. Even with the meta tag for IE edge set or set in web.config, this puts the document into IE11 mode, but compatibility mode still picks it up for being in the intranet zone.
It's getting a javascript error promise undefined, and works fine if I manually add the site to Trusted Sites on my local browser to get it out of intranet compatibility mode.
I've been reading that this is the document mode vs the browser mode, so this is running in IE11 document mode, but the browser mode is still whatever compatibility mode is trying to set it down to for intranet, which looks to be IE5 if I don't have the meta tag. I was also reading that the document mode should determine what javascript engine IE11 uses, not the browser mode, but maybe this isn't true? Telerik says they don't support compatibility view, so I've been trying to force it to 11/edge, but this browser mode is killing me. Any other suggesions?
I don't want to keep my site in trusted sites either because I also want Windows Authentication on but it's defaulted off, and even if I wanted to try to get them to push out a group policy change to all browsers, there are a bunch of other sites in trusted sites and I'm not sure if turning windows auth on for everything might cause other problems for other sites.
Here is a screenshot of the console showing the javascript error even though doc mode is 11.

Related

Is it possible to set IE compatibility for all pages except one?

I'm working on a legacy application which has the unfortunate need to rely on older version of IE to function correctly. Within this application I have added a page that uses HTML5/CSS3 and modern JavaScript libraries to render and function. This page has been given the meta tag: http-equiv="X-UA-Compatbile" content="IE-Edge"
Unfortunately this page does not render correctly. The application is an older ASP.Net system that I'm running on localhost IIS. The path for the app is http://localhost/csa/myappname and to the problematic page the path is http://localhost/csa/myappname/Responsive_Dashboard.aspxI have attempted the following:
Set the browser document mode to Edge using the F12 developer tools. This works for my page but breaks the rest of the application.
Updated the local sites.xml file with the Enterprise Mode Site List Manager, giving older browser compatibility to the http://localhost/csa/myappname and IE11 document mode to my page at http://localhost/csa/myappname/Responsive_Dashboard.aspx then set the browser profile to Enterprise using the F12 developer tools. In this case, the application works fine except for my page, which does not change the document mode.
Set the browser compatibility mode for localhost via the IE Compatibility View settings, and changed the browser profile to desktop. The results here are the same as in item #2.
Is there a way to set my page at http://localhost/csa/myappname/Responsive_Dashboard.aspx to use the latest rendering engine while leaving the rest of the application/site alone? The only way I can get this to work is to use the F12 menu to switch the document mode back and forth. This would not be an acceptable solution for my business partners. Thank you.
I discovered a workaround for this - what I am doing is opening the page in a new window / new tab and the functionality is working fine. It seems that the page was being wrapped in another page when navigating to it directly, which was causing the issue.
EDIT August 22, 2022 - After an update to the Edge browser that again broke this page, the team found a fix by adding the page to the sitelist.xml file.

IE11 javascript fails unless debugger is launched

I hava situation where some javascript a web page works fine in Safari and Chrome, but fails in IE11. Unfortunately due to issues with confidentiality I cannot put the javascript up here.
In IE11 the web page's java script fails to operate correctly. By that I mean some of the javascript works and some doesn't. With no errors displayed or any other indication of whats wrong.
If I try to debug the page using IE's developers tools, all the javascript works perfectly without any errors or issues.
Searching on the net I found many people with the same IE problem - fails normally, works when debugging. The main issues they talk about is the console.log(...) statement. I checked my javascript and don't have any console.log(...) statements.
I then saw a stackoverflow thread where adding a cache:false to the $.ajax({... calls solved the issue. I added the same flag but the problem still persists.
Are there any other bugs I've not found?
The web page is using jQuery to handle most of it's manipulation of the DOM with a single $.ajax... call and a series of $.get(... calls polling the server.
How to debug your web pages.....IE11 tips.
All modern web browsers suppress scripting error messages and warnings by default. (In the early days web browsers would halt page loading/rendering and display a script error message with an alert statement)... this gives the best user experience who isn't concerned with the internal workings of web site code.
So, scripting errors will only BREAK execution if:
1. The browser debug tool is opened. and
2. The developer tools' Debug tab setting for Break on Exceptions has been turned on.
So to debug your web pages.
1. navigate to about:blank to start a testing cycle.....press f11 to display the dev tool, select "Break on all exceptions" from the dropdown (looks like a stop sign). Pin the dev tool to the bottom of the browser.
2. Return to the browser address bar and navigate to your test site (typed address of paste and go)...
The dev tool will now break on ALL exceptions and you will list them in the console tab.
IE has built-in content blocking and has ActiveX filtering (ad blocking) which can affect outcomes. You need to configure Internet Options so that the IE dev tool console will record any blocked content or security (XSS) errors.
Tools>Internet Options>Advanced tab, check "Always record developer console messages".
Also on the Emulation tab of the IE dev tool you will find the Emulation Mode (aka documentMode) that IE is using, and how it was established eg. x-ua meta, Enterprise site mode list, user Compatibility View list, etc
If you are developing an internal company website, the emulation mode used by IE may be for an earlier version of IE.. (IE8 on XP).. you should include this information with your questions.
You should also include the IE security zone that your site has been mapped to.. File>Properties menu in IE.... eg. Intranet zone as this can have different security and blocked content outcomes.
finally, the first step in troubleshooting web browser issues is to test in noAddons mode (for IE, winkey+r>iexplore.exe -extoff ). IE has built-in form-fillers and popup blockers... third-party addons can affect the outcomes expected.

How IE Browse Mode Changed to 8

We have a web portal product and contains multiple iframes, js files and css files. Every time I visit the portal using IE11, the browse mode becomes 8, as shown in F12.
The weird thing is, I checked ALL requests and responses in Network in F12 Developer Tools, and only three response headers contains x-ua-compatible. The values are
IE=Edge
IE=EmulateIE7
IE=EmulateIE7
I have no idea where IE8 comes from?
Also in our DEV portal, the same product, it shows Browse Mode = Edge, even the same three values also present. It seems the browser mode is changed somewhere else outside Network/F12. I guess it is not javascript. But what can change IE's document mode?
Could this be related to Enterprise Mode? I think this is something that network administrators can set up.
If your product is accessible from the internet, I'd try using IE11 on a computer outside of work and see what happens.
https://technet.microsoft.com/en-us/itpro/internet-explorer/ie11-deploy-guide/what-is-enterprise-mode

Corrupted UI when trying to display reporting service report in an iframe

I need to display report services reports using an iframe which is opened from a web application that supports IE9, IE10, IE11 (the application cannot run with computability view).
When using the iframe, the UI of the displayed report is corrupted, as you can see in the attached screenshot. Seems that it happens when using iframes in general, not only from our application.
We cannot change the reporting services html on the customers machine, so this suggested solution can't assist us: Unexpected scrollbar in Reporting Services
Any ideas?
Following up# #jtbon2's answer - if this iframe is running on your company's intranet and you are inside of the same network with your development machine, your Internet Explorer might have the default option for compatibility mode enabled for local sites.
It will essentially downgrade your browser to a lower version of IE to enforce a a standard IE user base.

Resolving IE compatability issues seemingly caused by Microsoft's own software

We're using a third party content management system built on ASP.NET. The pages seem to display in IE9 mode on IE11. I used the MS IE10 compat inspector tool http://blogs.msdn.com/b/ie/archive/2012/01/20/ie10-compat-inspector.aspx to try and work out why the page is not displaying in IE10 or Edge mode. (The HTML5 feature that I'm trying to use should display in IE10 or 11.) The only warnings the tool gives are about Javascript which is using window.navigator to do browser sniffing.
The code that is using window.navigator is in a file called webresource.axd:
var __nonMSDOMBrowser = (window.navigator.appName.toLowerCase().indexOf('explorer') == -1);
which itself seems to be part of ASP.NET.
There are no javascript warnings or errors. Here's one of the pages:
https://secure.wycliffe.org.uk/NetCommunity/SSLPage.aspx?pid=283. This is with IIS6 on Windows Server 2003.
Could this be the cause of the IE9 mode problem? (I have <!DOCTYPE html> at the top of the document.)
Is MS's own tool really complaining about bad practise in it's own software?
Ah ha! It's because your server is sending the pages down with an X-UA-Compatible header, telling Internet Explorer to use IE9 mode.
To see it, open https://secure.wycliffe.org.uk/NetCommunity/SSLPage.aspx?pid=283 in IE10, and press F12 to bring up the developer tools. Switch to the Network tab, press Start and refresh the page. Once it's loaded, double-click on the first item, then switch to the Response Headers tab.
You should see a header in there: X-UA-Compatible: IE=9.
To force IE to use the latest rendering mode, go into the IIS configuration, find where it's being applied, and either remove it, or change it to a newer version, e.g. IE=10. Alternatively, IE=edge will always use the latest version's standards mode rendering engine. Be aware it's probably there for a reason, though! We've had to use that header in the past as a short-term workaround for IE10 issues in legacy .net applications.
See MSDN: Defining document compatibility for more information.

Categories