Take the 2-minute tour ×

I am new to development. I want to know that how we can manage the cross browser compatiability problems. for example some times it happens that same code is working with firefox but not with IE. I had an issue that one of my code of downlao

share|improve this question
This is too broad a question. Maybe give a specific example with code and error messages –  Pekka 웃 Jan 29 '11 at 12:04
There should be no compatibility issues with PHP, as PHP runs on the server side. Please clarify and more importantly complete your question. –  Felix Kling Jan 29 '11 at 12:05
Yes, welcome to the world of web development! Test, test, test more, build experience and test even more is the only real answer. –  deceze Jan 29 '11 at 12:05
With CSS, it's prett much as deceze says. But for JS, I highly recommend you use a popular library like ExtJS, jQuery, Moo Tools, Prototype, etc. These provide cross-browser methods for performing the most common tasks (the ones that cause cross-browser bugs). Or write your own library to do the same. I prefer popular libraries as they save you the time of having to reinvent the wheel. And many of these have UI libraries that speed up development even further. You could increase your productivity by 10x in extreme cases. –  Lèse majesté Jan 31 '11 at 4:31
add comment

4 Answers

up vote 4 down vote accepted

Whenever anyone says they have "cross browser issues", they almost always mean "it doesn't work in IE". Frequently, the developer uses IE as their reference for how things work which is the worst thing they could do since IE is 13 years behind all other browsers in modern standards and compliance and inept at best.

Therefore, always use a modern browser (anything but IE) to initially test your markup. Along with validation of HTML and CSS, this will make your code work everywhere in most cases. Then you know your code is written correctly. As you go along, look in IE to see how it screws everything up but the quirks and bugs of IE are well known, as are the hacks to fix it.

Never, ever trust IE to do anything right. Do NOT fall for the fallacy that IE9 will be any savior either.

share|improve this answer
that is a complete answer –  newdeveloper Jan 31 '11 at 4:52
IE has actually come a long way in the past 2 versions. In contrast, Mozilla has dropped the ball a bit in terms of supporting web standards. I don't think any browser will ever be fully standards compliant, and with new/emerging standards, it will always be a case of each browser having roughly the same level of support, but Webkit supports features A, B, C & D; Gecko supports A, B, C & F; and Trident supports A, C, D & G. So cross-browser compatibility will always be an issue due to each browser team prioritizing features differently. –  Lèse majesté Jan 31 '11 at 17:06
@Lèse majesté - While there are different levels of support among the modern browsers, IE is ALWAYS a laggard. Even the things it does support are either incomplete or incorrect. While IE9 will be better than IE8, that's not saying much compared to ANY other browser. –  Rob Jan 31 '11 at 19:01
IE9 is a huge improvement over IE8. Tons more supported standards; hugh performance improvements over itself and other browsers with the new Javascript engine and GPU support. The problem is IE dosen't force people to upgrade like the other browsers do. –  JohnEgbert Mar 23 '11 at 22:29
@JohnEgbert - No, the problem is that, while IE9 is much improved over IE8, that's not saying anything. It is still a laggard in modern standards and practices. Incapable of handling most of what any other browser can handle; like WebGL, WebM, File API, HTML5 Forms, and on and on. IE9 continues to hold back the web and no one should be using it. It's the worst browser on the planet. –  Rob Mar 23 '11 at 22:43
show 1 more comment

there are 2 possibilities when it comes to cross-compatibility:

  • handle cross-compatibility by yourself -> this is almost impossible for non-experts (keep in mind that you have to know how every browser is interpreting HTML/CSS/JS)
  • use a javascript library like:

the library will handle cross-compatibility ;)

share|improve this answer
Can you tell me how they handle such issue –  newdeveloper Jan 29 '11 at 12:19
They handle JavaScript cross-browser compatibility issues only. And they do that by using feature detection. If a feature doesn't exist, use an alternative. They provide cross-browser methods for performing common actions. This saves you the time of having to write the same cross-browser fixes again and again every time you want to do an AJAX call or get the screen size, etc. –  Lèse majesté Jan 29 '11 at 12:29
Why was this answer downvoted? It's not a complete solution, but it's a viable and widely used one. –  Lèse majesté Jan 31 '11 at 4:33
add comment

for IE u can use this little technique..:

 <!--[if IE]>

it was given out by microsoft...it worked for me!

share|improve this answer
add comment

Yes, I agree- your question is too broad.

If you want to test your code into different version of IE you can download this free software. IETester

Most likely if your code works on firefox it will work on chrome also. But not all, mostly.

share|improve this answer
add comment

Your Answer


