We recently noticed a weird behavior with asp.net apps with IE11. When I browse a web page (a webform) that contains a ScriptManager with IE11 on an English version of Windows the page works just fine. However, the Javascript crashes when I browse the SAME page with IE11 on a French version of Windows.
The errors we get are mostly related to some properties of the Sys object being undefined (like Sys.UI or Sys.Application) or to JQuery not being initialized. We created a simple webform app that has 2 textboxes, a postback button and a div that displays a summary of the Request.Browser properties. We can clearly see that the browser is considered the same by asp.net regardless of the language of the browser (user agent string and all properties are identical). However, the browser behave differently on the client-side.
Here's what we have confirmed so far
- The Web site runs on .NET 4.5;
- Browser detection works identically with En-IE or Fr-IE (same version detected);
- Html content sent to the browser is the same regardless of the browser's language;
- IE11 on French-Win7 shows the error while IE11 on En-Win7 works fine;
- There is no http error detected (the script files can be loaded by the browser);
- If I change IE's DocumentMode to IE7 in the Dev Tools the errors disappear!
- When we set the "disable script debugging" option to true in IE the errors don't show, but some features that rely on script are broken;
- Chrome (French locale) works just fine and have no issue.
However, we might have find a different behavior with the French IE:
- On the first page load, the MicrosoftAjax.js is loaded first, then the MicrosoftAjaxWebForms.js is loaded and a call to Sys.WebForms.BeginRequestEventArgs.registerClass('Sys.WebForms.BeginRequestEventArgs', Sys.EventArgs); is made and works fine
- On the second page load (after a postback, for example) the MicrosoftAjaxWebForms.js is loaded BEFORE the MicrosoftAjax.js file, which causes the call to registerClass to break because Sys.EventArgs is not loaded (it is defined in MicrosoftAjax.js).
Why would a localized version of IE behave differently from the English version? What control do we have over the order the scripts are loaded by IE?
On option we would like to explore is compare the IE's settings from a French and an English machine, but we haven't found a tool that would help (there is thousands of different settings). Any help would be appreciated.
David