
Ask HN: Which browser is the best to develop in? - phn
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:<p>What browser can give more "guarantees" that what I develop will work consistently in other browsers?<p>i.e. If I develop and test my work in firefox, will it work with other browsers in 99.9% of the cases?<p>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.
======
lutusp
> 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.

~~~
phn
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.

~~~
lutusp
> 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.

~~~
lutusp
I offer this addendum to my prior comment:

[http://www.paulzaich.com/2013/02/21/blog/ruby-rails/https-
go...](http://www.paulzaich.com/2013/02/21/blog/ruby-rails/https-gotcha-in-
ie8/)

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'."

------
Piskvorrr
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...

~~~
phn
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 :)

~~~
Piskvorrr
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).

------
peder541
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.

