ua-x-compatible closest setting to IE8 Compat - asp.net

we're currently maintaining an enterprise application based on ASP.Net 3.5, MS Enterprise Lib 4.1 and Telerik ASP.Net AJAX 2010. The application consist of 2 different part, intranet and internet portion. We announced compatibility with IE6 and above and Firefox, back in 2011. It's been fine so far until IE10 and 11 came into the picture. Since launch, we've advise users to turn on compatibility mode for IE8 & 9. But for IE10, we found that we need to add App_Browser, and it still break certain pages.
Now we plan to provide support to IE9 and above so we've decided to update Telerik ASP.Net AJAX to the latest version. But during this transition period, we notice a lot of UI issues when switching between browsers. To minimized effort on updating every page, we want to try using "ua-x-compatible" in web.config to force all browser to render with the best fit rendering mode. But there's no mentioned of setting IE=6. We're wonder how to configure it so that all new IE browser switch into Compat view mode used by IE8. Another thing we notice is that with IE=8, there's minor differences in terms of look and feel when compare to using IE8 Compat View. We're trying to minimized the differences as much as possible, to preserve the user experience.
We also understand that in intranet, newer IE browser will fall back to Compat View automatically, but that doesn't seems to be the case for us.
If there's a direct answer to this, then I would really appreciate it, otherwise some direction would be a good starting point.
Thank you

We should no longer as community keep support for IE6
Several communities are promoting to remove total support for this browser.
http://www.ie6death.com/
But I understand this not always I call we can make. I would recommend you to try :
http://modernizr.com/docs/#support
This will polyfill your javascript and will help you with your browser support.

Related

Compatibility Modes for IE11 EMI and Comp

In VERY laymans terms - three questions if I can:
First, my understanding was that Comp Mode provided some rendering assistance (IE9?)- and that EMI provided the rendering further back (IE8) (along with some of the Speed enhancements) - Is this correct?
Second, it has been suggested to me that the natural progression to test compatibility would be:
Native
EMI
COMP
EMI and Comp
I would have thought (based on my understanding) that it would be:
* Native
* Comp Mode
* EMI
Finally, is it feasible and what is the benefit to put the website into EMI AND Comp Mode?
For some users, features like enterprise IE (EMIE), compatibility view, and the other document modes are useful because they make recent versions of IE11 behave like older versions of the browser. For example, EMIE makes IE11 behave like IE8.
Why would you want this? After all IE11 supports many more standards that IE8 did. IE11 is more consistent with other browsers than IE8 was. These make it easier to create public websites that behave consistently when used by other browsers or devices.
The compatibility features, however, are meant to help those trying to maintain older applications, applications that depend on feature that IE11 no longer supports for whatever reason.
I think what you call comp mode is what MS calls compatibility view, which puts recent versions of IE into a mode similar to IE7. There are other modes available, called document modes, that put IE into modes designed to emulate earlier versions of the browser. There's a mode for each version from IE7 to IE10 as well as a mode similar to IE5 and earlier. The IE7 document mode is essentially the same as compatibility view.
The problem is that the document modes (and compatibility view) are all approximations of earlier versions. They're not perfect emulations. In many cases, they're enough to help an application work.
EMIE is a specialized mode designed to better emulate the behavior of IE8. For some companies, EMIE helps an older application run even when it doesn't run in IE8 document mode. Why? Because those apps were written based on the features and behavior supported by that version of the browser.
If you're testing applications, I would say the best approach is to run the app in whatever mode is default with the new version of IE. Use the developer tools (or even the scanner on modern.ie) to help identify problems and then update the app to work accordingly. This requires an investment of time, energy, and money that some are unwilling to make. (I would argue that this is short-sighted in the long run, but the mileage of others may vary.)
Barring that, I would use the developer tools to switch to different document modes to see if the application can be made to run until such time it can be updated. If you find a document mode that works, then you use the appropriate 'x-ua-compatible' header to enable that document mode.
If there isn't an appropriate document mode and the app worked fine in IE8, then EMIE might be a useful too. You enable that using group policies or registry keys.
There is a lot of information available to help fill in the gaps of this explanation. Here are a few to get you started:
Defining document compatibility
Specifying legacy compatibility modes
The IE Compatibility Cookbook
What is Enterprise mode?
Chris Jackson's AppCompat Guy blog.
In the end, you'll need to investigate the apps that are causing problems and determine an appropriate course of action based on the resources and priorities of your organization.
Hope this helps...
-- Lance

How to make the ASP web pages designed in IE6 compatible to IE8?

My web applications are designed in IE6 compatibility mode. Now I need to migrate to IE8, but most of my web pages are not in good allignment in IE8 browser. First I tried the compatibility view in IE8(the button near the address bar), but of no use. Then as per somebodies suggestion I have added the meta tag '' in the section of every html pages, but still it is not working. I am using Windows XP professional OS version 2002 with service pack3 and IIS version 5.1. I am not sure I can migrate to IE8 with this system configuration. Moreover I am a beginner in this session. Could somebody please explain how can I acheive this?
Thanks in advance,
Lakshmi.
A good place to start would be to open up the pages in a tool like visual studio and look at the list of violations listed. Go down the list and start fixing things that are deprecated or wrong. Notepad++ has an "HTML Tidy" feature that will reformat and correct some common mistakes. However, many of the problems that you are going to encounter are not trivial - as in the entire paradigm followed is probably wrong. Converting a site is, unfortunately not the type of thing that we can do by running the pages through a wizard. I would start by creating a new MasterPage (or global template for whatever framework) that uses CSS for formatting and layout. Then you can migrate blocks of text into the new "skeleton". Some of the CSS template sites offer really nice free templates. Hope this helps.
If this helps you, the new IE 9 has developer tools (F12) which allow you to use either the IE7, IE8 or IE9 rendering engines to view any page.
As a best practise, when making any content for the web you should be checking compatibility on at least the 3 main browsers (IE, Chrome, Firefox), and probably some of the others (Safari). There are Visual Studio add-ins that can help with this kind of thing, by choosing which browser(s) are used for debug mode.
Some of the developer tool suites also allow you to edit content in the browser which can be a big time saver. This lets you tweak CSS and HTML and see the results in real-time, you then just have to apply your changes to the original code. Chrome, FireFox and IE (newer versions) all have tools for this kind of thing, and/or free plug-ins.
You will find in IE8 that the behaviour is better than IE7 and IE6 but still far from perfect, but should notice that the behaviour across Firefox, Chrome, Safari etc is fairly consistent.

Best way for cross browser applications

In our organization, we are still on .net 1.1 environment, using javascript, a few open source applications/widgets. Development is done using Visual Studio 2003, grid view, and iframes. Our application works in Internet Explorer 7 and IE 8 (in compatibilily mode). Can anyone give any basic steps we can take to get our application to work cross browsers? What are the starting locations we can get at to start making existing code work in different browsers?
Use jQuery for reliable cross browser JavaScript
Was it VS 2k or VS 2k3 that "helped" the developer by rewriting their HTML (in all CAPS no less)?
Make your HTML markup standards compliant. I find that developing my website following W3C standards ensure that my sites work in all major browsers.
I also develop in Firefox and then fix IE using conditional stylesheets.
The .NET version does not matter on browser compatibility.
Install and Run Firefox (and get the Firebug addon).
Enter your application and open the Firebug console (F12) to see what issues your application is encountering. (in the Console Tab)
Start with the Errors.
Change any JavaScript that is doing things like document.all.xxxx to use document.getElementById() or document.forms['name'].elements['name'] etc.
Change any CSS that is using IE only styles. e.g. "cursor:hand" should be "cursor:pointer" etc.
Repeat for Warnings once all the Errors are gone
If your app was running in Quirks mode, consider adding a doctype so that you can render in Standards mode (makes CSS/JS much more compliant)... however note that this will very likely "screw up" your pages for a bit until you iron out the kinks.
In the future, be sure to test in all major browsers. I'd recommend developing in Firefox or Chrome first, then tweaking if needed for IE.
.Net in its 2.0 iteration got a lot better (compared to 1.1) at producing cross-browser, and certainly more standards-compliant code (although not perfect by any means).
If you can upgrade to 2.0 this will get you a lot of progress on the standards compliance front for free (unless your own controls / html render as non-cross-browser html and/or javascript; then that would be the first main problem to tackle).
In .Net 2.0 don't forget to appropriately set the xhtmlconformance attribute in your web.config (if you're for example aiming for xhtml). This globally affects the produced html your controls produce.

upgrading ASP.NET website for IE8/Firefox

I need to upgrade a ASP.NET website for IE8. it works fine in IE6, but not in IE8. I don't want to run it in any backward compatibility mode. I would like to make any code changes that are required to make it fully compliant with IE8/Firefox. what is the best and/or easiest way to do that? is it just a case of going through each of the things that are broken and fixing them one by one or is there a more efficient way to fix these issues (some kind of utility??). thanks in advance.
Well there is no tool or utility to fix cross browser compatibility issues. You can make use of firebug(firefox) and IE developer toolbar to identify the points where the website is breaking.
But the good part is that you are upgrading from IE6. I dont think there will be major hiccups or problems making the website compatible with IE8 since its much better in rendering HTML as compared to IE6.
If you have expression web, you could use SuperPreview: http://expression.microsoft.com/en-us/dd565874.aspx
THis is a great tool that allows you to compare you site in different browsers.
Yes, you do have to go through each browser incompatibility bug and fix it for that browser. A bug can be fixed in 3 ways (listed in my order of preference):
Start with a very compliant browser, then look at the page in other browsers (I focus on Chrome/Safari/Firefox/IE6-7-8-9)
Use different CSS technique, that ends up rendering the same in all browsers
Use IE Conditional Comments to bring in another CSS for that browser leveraging the CSS "Cascade"
Use CSS Hacks as a last resort (usually only for Firefox or something)
But "go through each browser" can be the tricky part! There are some tools to help.
#Brian mentioned SuperPreview for Expression Web (+1), but there's also a free version of SuperPreview for Internet Explorer for those who don't have Expression Web.
You can compare different versions of IE on the same machine (hard before this product). Microsoft claims this sub-set of the Expression Web product will always be free (since they feel bad about IE6!).
IE6-7-8-9 tool is good enough for me, because I tend to focus on all versions of IE, but only the latest versions of Chrome/Safari/Firefox.
But if you must test against multiple versions of other browsers:
Expression Web SuperPreview
How to Use Multiple Browsers on a Single Machine
10 Helpful Resources for Cross Browser Testing
(Although Litmus seems to have dropped general web page support, and instead focuses on email client compatibility and campaign analytics.)

Asp.Net website looking fine in IE6 but not in IE7/IE8

I have a small website developed using VS2005 and mySQl, it's just 2 webforms and login page.
During the development and testing phase, me and my customer were using IE6, and it was looking fine, we didn't test with other browsers because it's a small application, and just a add-in for large desktop application.
The customer informed me that site doesn't like the same when he installed IE7, for example I have a webfrom that show a page with Gridview that has multiply pages(AllowPaging=On), it doesn't look fine in IE7 and I can't navigate to other pages in Gridview, but it was working fine with IE6, and there's no complicated things, just plan GridView with small formatting.
I installed IE8 and doesn't look fine with it too, even in compatibility mood.
Have anyone faced the same problem?, and what should be the quickest or best solution for that?.
I know, I SHOULD NEVER USE WEBFORMS AGAIN.
The only reason for a difference in look between the browser versions is your styling and doctype.
Start with setting a doctype to run in quirks mode. You can get information about it here.
After that, see if things improve. If not, I would start ripping out any css/styles/themes you may be using. Then build it back up using normal CSS.
Incidentally, web forms isn't the problem in this case; it's a styling issue.
as Chris mentioned, add to that that browsers have really some annoying differences that makes you pull your hair sometimes, and 90 % of the time it is related to CSS.
so what i suggest is the following
use a tool called IE Tester, it is amazing tool that let you test your sites in all IE versions.
Use conditional command for targeting IE specific version if some CSS rule is wrong.
we use this tool http://rafael.adm.br/css_browser_selector/ it is really amazing it let you define css rules for each browser without hacking or conditional statement, but the down side it is Javascript dependent, but we had no complains.
also this script http://dean.edwards.name/IE7/ which is brilliant, it will let IE 6 behave like IE 7 which will save you tons of problems, again it is Java Script dependent.
Avoid Hacks as much as possible, the above methods will help you a lot.
hope this helps.

Resources