How to update website for compatibility with Internet Explorer 9? - asp.net

when I launched my site within Internet Explorer 9 I began receiving script error messages. I read the support for Internet Explorer and found out that because some sites are designed for older browsers there'll be compatibility issues until the sites are updated for Internet Explorer 9.
I found that I could add this code :
void Application_BeginRequest()
{
Response.AppendHeader("X-UA-Compatible", "IE=EmulateIE8");
}
to the Global.asax file to deal with the issue. The errors I received were from IE9.
EDIT: The errors were fixed but I want to know if there is an alternative method to making a website compatible with IE9? Also what are the differences between the way IE8 interprets Javascript code and IE9?

What you did is correct. This is one of the server side way to handle this. Alternately, you can set this in HTML header (will be painful as you have to do it for all the pages)
On a related note - read the IE compatibility blog which has more details on this topic:
http://blogs.msdn.com/b/ie/archive/2010/06/16/ie-s-compatibility-features-for-site-developers.aspx

Related

404 error - File or directory not found. This is happening with certain pages when using Chrome Web Browser

I've been hired into a company that uses ASP.NET for all of their external and internal sites. I'm not too familiar with ASP.NET.
I'm currently working on a external site that runs perfectly in Internet Explorer.
When using the site on chrome, I have certain pages that give me the 404 - File or directory not found.
What can I do to help prevent this error code from showing up when using this site the chrome?
From your description, I understand that your site is a legacy site that is compatible with the IE browser but it is not working properly with modern browsers.
The 404 error information generally informs us that something is not found but if the site works fine in the IE browser then it could be possible that the issue is something else. In that case, this is too little information to predict the cause of the issue.
You may need to provide detailed information about which exact piece of code has the issue. Which version of the Asp.Net project and which kind of project(Web application, web API, etc.) it is. You may need to modify your code or project to make it work with modern browsers including Google Chrome.
At present, if you don't want to make any changes in your code then you could try to use the IE mode in the MS Edge browser to load your legacy site.
You could configure the IE mode manually or using the group policy.
To quickly check it, Launch the Edge browser. Paste edge://settings/defaultBrowser in the address bar and press the Enter key. Add your page to the Internet Explorer mode pages. Visit your site, it should load properly in the IE mode in the Edge browser.

Simplecart makes IE11 crash on win8

I've installed simplecart on a wordpress site
http://www.pixelligentdev.com/products/
It works fine on firefox - chrome - but not in IE11 on win8 / win10 and I can't find the issue because with debugger tool open it doesn't crash !
If you try to buy a product clicking on "order" button you'll see
It was fixed!
To track it back to source I’ve run IE with VS (Visual Studio) attached + public symbols.
The issue is a IE11 bug related to the storage events and localstorage usage. The bug was not happening when DEV tools was enabled because opening the console will set the mode to “Edge”.
Unfortunately the Microsoft’s reply is:
“This issue appears to have been fixed in Microsoft Edge. We're not presently working on feature bugs in Internet Explorer outside of security-related issues.”
The workaround is simple.
You can force IE11 to load the backwards compatibility mode to IE10.
The MS new browser (Edge) is not following that directive and IE <=10 are also ignoring it.
This can be done by adding a X-UA-Compatible meta,but this approach is not
recommended.
Instead I’ve pushed it via the header (.htaccess) to avoid page validation errors.
Changes in .htaccess
• I’ve Added to header “X-UA-Compatible” mode that will force IE11 to render as IE10.( backwards compatibility)
Header set X-UA-Compatible "IE=EmulateIE10"

My ASP.NET website is not displayed correctly in Internet Explorer 10 after server deployment

I've created a website using ASP.NET (C#) Framework 4.0
When running on my local IIS (in debug/release - before and after deployed) - the website is displayed correctly - as intended (checked on Internet Explorer 9, 10, Chrome and FireFox)
After I've deployed the website to my server (Windows Server 2008 DataCenter - Amazon hosting) - and only in IE 10 - the website is NOT displayed correctly - spacing is sometimes wrong, background colors sometimes disappeared, links not working properly, padding/margin is missing in some of the places and more... - it seems like the styles/CSS are partial... On other browsers (Chrome/FireFox/IE9) - it is displayed correctly (as intended)
I've tried to add the compatibility meta tags to IE=9 - didn't work (by the way, in IE10 - if I open the F12 tool - and change the Browser Mode to IE9 - it works!, but if I just change the Document Mode - it doesn't seem to help)
Why is Internet Explorer 10 evil??? Has anyone encountered this issue? any suggestions?
Thanks a lot! :)
As you write you are using F12 tools. My experience is that with Developer Tools running IE10 often does not apply all CSS rules (especially in at the end of external files). Refreshing the page or closing F12 tools usualy solves the problem. Also if you know which style is not applied it helps to disable and enable it again.
i have passe through a similar situation and some things just don't stay they way i want in every browser, so perhaps the better way out is to create CSS hacks tos specific spacing or styling issues you may have encoutered.
http://www.impressivewebs.com/ie10-css-hacks/
After a lot of searching and frustration, I've found the solution to my problem (here: http://www.nuget.org/packages/App_BrowsersUpdate)
Apparently the website should be updated to allow IE10 compatibility...
In your solution - install the ASP.NET Browser Capabilities Update using the following command in the "Package Manager Console" (can be started from "Tools"->"Library Package Manager" in your VS):
Install-Package App_BrowsersUpdate
(this will add ".browser" files to your website and few lines in your "web.config" file)
Rebuild and re-deploy your website and that's it! now my deployed website looks as intended on IE10!
(I still don't understand why it worked correctly on my localhost and not on the web server but at least the problem is solved)

deployed application appears different in IE8

I developed an application locally using the Visual Studio 2008 built-in web server and it is running nice and neat on every single browser.
When we deployed it on the IIS6 and open it on IE8, there are rendering issues. The fonts are bigger than the other browsers (which are still nice and neat) and some components just moved around. The generated HTML is the same as the others.
How can this be fixed?
Which DOCType are you using - are you in "quirks mode" or "standards mode"?
Are you using a CSS reset?
Are you using the IE7 compatibility tag?
There are ways to fix what's "wrong" but without seeing your code, determining what's wrong is difficult.
Press F-12 in IE8 and see what browser mode you are in. If you're in "quirks mode" you're in trouble.
Thanks to Diodeus and thirtydot we figured out how to solve the problem.
The meta tag "X-UA-Compatible" allow you to control the way Internet Explorer interprets and displays your webpage. when i set , it overrides the ie7 rendering mode that IIS 6.0 puts IE 8.0 into.
Here is some useful information about that:
http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

Preventing <link>ed CSS file blocking downloads in Internet Explorer 7

Internet Explorer 7 (but not 8/9) blocks anything downloading until the CSS file has finished on our site.
We are not using Internet Explorer tests around it <!--[if IE ]><![endif]-->, nor are we using protocol independent URI's (// instead of http://). It is just a straight forward /css/global/core.css link and yet the browser waits until it has finished downloading before commencing.
Are there any techniques to prevent this behaviour?
PS: All the JavaScript is at the bottom, all the static content is hosted on another domain (except the CSS due to it being able to reuse the existing connection after the HTML document, resulting in a faster experience for the user even with additional cookie headers).
EDIT:
The problem is that profiling IE7 with DynaTrace causes CSS files to block further downloads, however with DynaTrace turned off it works. So this is a DynaTrace bug, not an IE7 one.
WITH DynaTrace:
WITHOUT DynaTrace:
Perhaps you hitting the limit for the number of parallel downloads per domain?
I believe IE7's default is 2 files per domain , whereas many newer browsers support 6 by default.
http://www.stevesouders.com/blog/2009/05/12/sharding-dominant-domains/

Resources