Alex Rivera | Logout

Design order: Firefox, IE, or both?

Asked 2009-02-10T06:21:31.350
10

When coding new javascript heavy websites, which order or web browser do you code for?

I can see these possible orders, but I am not sure which I like best:

  1. Code for one first and get it working well, then start testing with other and fix errors as I go.
    • This will allow for the most rapid development (with Firefox at least) but I've learned from experience that debugging IE with so much going on at once can be a pain!
  2. Code for both at the same time. In other words, for each new feature, ensure it works with both browsers before moving on.
    • This seems like it will actually take more time, so maybe do several features in Firefox then move to IE to patch them up.

What do you all do?

Edit 1: To respond to a couple of answers here.: @JQuery usage: For some reason I was not expecting this kind of a response, however, now that this seems to be the overwhelming accepted answer, I guess I should tell everyone a few more things about the specifics of my app. This is actually the DynWeb that I started another question for, and as I'm developing, a lot of the important code seems to require that I use document.whatever() instead of any JQuery or Prototype functions that I could find. Specifically, when dynamically importing changing CSS, I have to use some similar to:

var cssid = document.all ? 'rules' : 'cssRules';  //found this to take care of IE and Firefox
document.styleSheets[sheetIndex][cssid][cssRule].style[element] = value;

And I expect that I will have to continue to use this kind of raw coding currently unsupported by either JQuery or Prototype in the future. So while I would normally accept JQuery as an answer, I cannot as it is not a solution for this particular webapp.

@Wedge and bigmattyh: As the webapp is supposed to buil

Edit
Report

2 Answers

1

I do IE first, and then add Firefox.

My experience is that once it works in IE, it continues to work in IE, and the question why something not work in Firefox is usually easy to answer.

answered 2009-02-10T06:24:37.490
1

If you have to code for IE6, the most frustrating part is coding the CSS and HTML. jQuery and other libraries make it easier to code the behavior -- but you generally can't get around the fact that IE6 has so many weird rendering issues that you'll be frequently banging your head on the keys trying to make it do what Firefox, Safari and Opera do right the first time.

So Javascript isn't the hardest part. Dealing with HTML and CSS is. In my experience, if you're working with any reasonably interesting design, you're better off coding for IE first and then testing on Firefox. You probably won't have to make many adjustments if you do IE first, but you definitely will have to spend some time refitting your code to make IE do what you wanted it to, if you only code in Firefox. It's like repeating yourself. It's a pain. So it's better to get it done first so you don't end up wasting too much time.

answered 2009-02-10T06:31:47.270

Your Answer