Ask HN: Which browser is the best to develop in?

4 points by phn ↗ HN
I have been doing web development for a while, but mostly server side. Only recently I have started to do client side dev and the question pops up:

What browser can give more "guarantees" that what I develop will work consistently in other browsers?

i.e. If I develop and test my work in firefox, will it work with other browsers in 99.9% of the cases?

This also comes a bit from the recent Opera switch to webkit, where people worry that developers focus on webkit only, leaving firefox and friends in the dust.

10 comments

[ 4.0 ms ] story [ 38.2 ms ] thread
> What browser can give more "guarantees" that what I develop will work consistently in other browsers?

You're asking the wrong question. What you need to ask is, "which set of test browsers will assure that my work will appear as I intend for the majority of visitors?"

And the answer is: "Microsoft Internet Explorer, Firefox, Chrome, Opera, and Safari".

Set up your work environment so that you can test your results on these target browsers as conveniently as possible. And do all you can to use standard methods -- avoid techniques that only work on one or two browsers, or that break widely accepted browser standards.

> i.e. If I develop and test my work in firefox, will it work with other browsers in 99.9% of the cases?

Without seeing what you code, this is impossible to say. So test on all the browsers -- don't assume things will work out.

First of all, thanks for your answer.

> And the answer is: "Microsoft Internet Explorer, Firefox, Chrome, Opera, and Safari".

Well, my main issue is that testing in so many browsers, and making adjustments for each one seems to go a bit against the goal of standards.

> And do all you can to use standard methods -- avoid techniques that only work on one or two browsers, or that break widely accepted browser standards.

Is there any way one can test/learn this? I would love to have a solid "standards compliant" base knowledge to at least be aware of when I'm doing something outside of standards.

> Without seeing what you code, this is impossible to say.

Of course :) I was talking in a general way.

Once again, thanks.

> Well, my main issue is that testing in so many browsers, and making adjustments for each one seems to go a bit against the goal of standards.

But your goal isn't standards, your goal is to make pages that all your visitors will see the same way. That means you need to adapt to the present realities of Web development.

>> And do all you can to use standard methods ...

> Is there any way one can test/learn this?

Sure -- read the specifications. Examples:

http://xhtml.com/en/xhtml/reference/

http://www.w3.org/html/wg/drafts/html/master/

My point is that this is not easy to do.

I offer this addendum to my prior comment:

http://www.paulzaich.com/2013/02/21/blog/ruby-rails/https-go...

Title: "Always test your app in IE8"

Quote: "A simple 1 character change from ‘http’ to ‘https’ on the shim was all that was needed to fix the problem, but it had been lurking there for several weeks unseen because we only were testing on 'modern browsers'."

> Well, my main issue is that testing in so many browsers, and making adjustments for each one seems to go a bit against the goal of standards.

The state of the Web is currently closer to a single standard than it's ever been in its history. Nowadays, it's fairly easy to make the adjustments - or even use libraries which abstract the most discrepancies. It could be better, of course - but one has to work with the world as it is, not as it should be :)

This is easier now than ever. Lately I've had a lot of luck writing something once and having it work with IE10, Chrome, and Firefox immediately. That leaves only fixes for IE8 and IE9. By designing things to be responsive from the get go, mobile is 98% supported off the bat too with only small fixes needed thanks to Webkit's majority.

I would suggest starting with a base such as Bootstrap (or another framework of your liking) and getting a Browserstack account. Testing becomes much easier with Browserstack and they were offering three months free with a coupon, so give them a try.

None - sorry to disappoint you, but There Is No Silver Bullet. To be safe, you still need to fully test in all A-grade browsers (this is a moving target, yes; currently the bare minimum is FF,Chrome,IE).

In my experience, whatever browser you work in, expect the result to work with other A-grade browsers in 90% of functionality. Sometimes it may happen to be 80%, sometimes 95%, but three nines ("99.9") is an unreasonably high expectation.

And of course, then there's the special browser : IE. Current versions are juuust about bearable, but users on WinXP are stuck with IE8. Is it worth the effort to have the site look good there, is it worth the effort to have the site kinda work there while looking somewhat ugly, or should you just leave them in the dust? Not really a technical question...

I see, what about feature-wise? Is there a set of functionalities that can be considered "cross-browser"?

I guess we're still not there yet (and probably will never totally be :)

Check out http://caniuse.com/ - it shows you compatibility tables and browser support for most of the functionalities.

As for "core functionality" - much functionality can be faked or unified through abstraction libraries (e.g. jQuery) and compatibility shims (e.g. modernizr).

Unfortunately, you really do need to test on all the browsers. That being said, you can have a main browser you develop in and once you finish certain features, do quick tests to see if the other browsers behave the same.

I use Firefox as my main development browser because it doesn't cache files saved on the local disk. Chrome does cache locally saved files, so you need to remember to the clear the cache (Ctrl + F5) after making any changes to your code. This is surprisingly easy to forget and can lead to some frustrating moments.

I do prefer Chrome's built-in console, so I'll often switch to Chrome if I'm going to use the console a lot.

Finally, Opera has a sweet Remote Debugger that's nice for doing client side development for mobile devices.