0

I am working on a project to convert a web site that is fully functional in Internet Explorer 8 and lower, but does not work well in Firefox or Safari.

A lot of what will need to be changed is going to be javascript-related (aka methods that exist in IE but not in other browsers).

What I want to know is whether anyone is aware of a fairly comprehensive list of common things that have to be changed to work accross all browsers.

I am starting with quirksmode.org but I don't think it will have quite everything I'm looking for. If anyone knows of a list please let me know.

Matt
  • 477
  • 1
  • 5
  • 19
  • 1
    Here is a very good list: http://stackoverflow.com/questions/565641/what-cross-browser-issues-have-you-faced – Phil Jul 08 '11 at 20:22
  • thanks - that's a good starting point... but it seems there should be a more formal/inclusive list – Matt Jul 08 '11 at 20:27
  • I'll try and post an answer tonight, but the best advice I can give you is "do your homework". Mozilla's Dev Center, MSDN, and w3's docs on DOM levels 1-3 are a big help. –  Jul 08 '11 at 22:12

4 Answers4

4

Your best option here is to go with a Javascript toolkit/library like jQuery, MooTools or Prototype. Such a decision will save you a monstrous amount of work, and all three are constantly being updated which gives you a large degree of safety against future compatibility issues. Especially for DOM manipulation or AJAX, a library is the way to go.

If you absolutely mustn't use one, quirksmode is a good start. I've never found any single source that is comprehensive enough to keep me from running back to Google for each problem area.

Winfield Trail
  • 5,535
  • 2
  • 27
  • 43
  • i definitely want to use jquery as much as possible... and you are right it seems there may not be a single comprehensive source for what i'm looking for. "Google" may be the answer... – Matt Jul 08 '11 at 20:30
  • The one single reason that using a framework is the best option is this: just look at the list that Phil linked you to! Accounting for those items alone could take weeks, depending on the size of your codebase - and it's only barely scratching the surface. With a library you have the security of knowing that, whatever you wrote, there are dozens of developers working hard to make sure that exactly what you intended to happen IS what happened. And that's pretty amazingly great for us, the web-developing public. – Winfield Trail Jul 08 '11 at 20:35
  • @Matt, I guess I should ask: how much code do you have to sift through? – Winfield Trail Jul 08 '11 at 20:36
  • it's a huge app...and the javascript is mixed in with the java code base as well as in the own separate files... – Matt Jul 11 '11 at 12:59
  • I'm accepting this one because it is closest to answering my question, along with solution suggestions.. plus some of the comments are helpful as well. Thanks for your help and feedback. – Matt Jul 11 '11 at 17:16
  • Certainly, Matt. If there was a simple answer to your dilemma, I would have said - crossbrowser support is without a doubt the ugliest problem in our industry today. Best of luck with your application. – Winfield Trail Jul 11 '11 at 17:50
1

Quite honestly, if you don't have lots of experience doing cross-browser development, I suspect the best way to fix your app is to set up a good test environment on each target browser and starting finding where it breaks. You're eventually going to have to test it on each target browser anyway, so you might as well start there. Once you find out what code is failing you for a particular bug, you can do more targeted searches for how to work around that issue in a cross browser way.

You will, over time, build up a good internal knowledge base of what is safe to use in a cross browser way and what is not. Even experienced developers still run into new issues on every project that are only found with testing. One advantage of experience though is that you start to learn when to suspect that something might or might not have cross browser issues and either avoid it (find a safer way) or explicitly test it in several browsers before you use it.

I find that http://jsfiddle.net is awesome for creating very efficient self-contained test cases to either proactively try something in other browsers or to troubleshoot something that's been giving you a problem.

As others have said, one huge advantage of the various browser libraries like jQuery or others is that they have solved a lot of these compatibility issues for you and, in general, if they document a function in the library and don't explicitly warn you about cross-browser issues, then they've already done their homework to make it safe for you.

jfriend00
  • 683,504
  • 96
  • 985
  • 979
0

You may also find out that using a javascript framework such as jQuery, ExtJs, Prototype, Mootols, ... would be very beneficial in writing cross browser javascript.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • This doesn't really answer the question. – user113716 Jul 08 '11 at 20:24
  • yes I also started to use some jquery, but not knowing everything to look to replace is challenging to get started. I will also keep in mind these other frameworks. – Matt Jul 08 '11 at 20:25
  • 1
    @patrick dw, it provides a better alternative for what the OP is trying to achieve which is writing cross browser javascript. Why do you think that it doesn't answer the question? – Darin Dimitrov Jul 08 '11 at 20:28
  • the question, ultimately, was: is there a list of things that work in IE but not in other browsers...js related. That way I will know "what" to convert to whatever solution (library or other) that I find is best – Matt Jul 08 '11 at 20:32
  • @Matt, I am afraid that there won't be any single comprehensive answer to this question. – Darin Dimitrov Jul 08 '11 at 20:34
  • It would be nice if there was such a resource. I've thought about creating something, but haven't gotten around to it. – user113716 Jul 08 '11 at 20:45
  • @patrick dw, I think the problem is not that much with creating the resource (obviously exaggerating). It's about maintaining it up to date. Especially today when we get new versions of browsers so often. I don't even know which version of Google Chrome I am currently running and even less what features it supports. That's why frameworks such as modernizr are great as they provide a feature detection. – Darin Dimitrov Jul 08 '11 at 20:49
  • Yeah, good point, especially about Chrome. Their version numbers are near meaningless. – user113716 Jul 08 '11 at 20:53
0

a web site that is fully functional in Internet Explorer 8 and lower, but does not work well in Firefox or Safari

I would strongly recommend to develop with a browser that meets the standards (e.g. CSS3).

The process should rather be: to develop with FireFox or Chrome - and fix all IE versions later on.

Well, this is my daily bread... and ordinary it's IE b*tch which makes me loose time...

Martin Zeitler
  • 1
  • 19
  • 155
  • 216