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.
Related
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.
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.
I upgraded my current IE6 version to IE8 recently, but one of my Asp.net web application has some problem with the allignment of some lebels, textboxes etc in the web pages. The application is working fine, but only with the design issue(some textboxes and labels are not in a proper order as before in IE6). I have selected the compatability view in IE8, but still the issue is there. I have changed the 'Absolute' positioning of the fields in the web pages to 'Relative', but no use. Could somebody help me which would be much appreciated.
ASP.NET isn't responsible of letting your application show expected layout styling.
Whenever a web browser is upgraded - Internet Explorer, Firefox, Opera, Chrome, Safari... - there're some breaking changes because technology goes forward, or some Web standards compliance break old and wrong ways of doing things.
Your upgrade to Internet Explorer 8 or newer versions would force you to fix your Web application in any Web platform, even in ASP.NET.
Just inspect your CSS and markup, and try to fit to Internet Explorer 8 standards mode in order to get your Web site rocking again!
Internet Explorer has something called compatibity mode if your site has issues, this can be used as a stop gab. But you should off course fix the html/css so that it works on all the browers.
To find and fix the html/css issues, pass the url to one of the many html verifiers on the internet it will normally tell what you need to fix.
you could placing the following tag in the head section of the html-document:
<meta http-equiv="X-UA-Compatible" content="IE=IE5" >
Causing the page to run in Quirks mode, what can perhaps fix the errors (or not ;). Depending on the (declared) doctype you could mess with several compatibility modes
However, I encourage you to change your css in a compatible way. Perhaps by overruling the failing css-classes with conditional comments and some stronger specificity
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.)
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.