Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The 'Building for Just One Browser' Thing

DZone's Guide to

The 'Building for Just One Browser' Thing

There's no doubt that Chrome is king, but web developers need to keep other browsers in mind. Don't make the mistakes of the past when building websites.

· Web Dev Zone ·
Free Resource

Deploying code to production can be filled with uncertainty. Reduce the risks, and deploy earlier and more often. Download this free guide to learn more. Brought to you in partnership with Rollbar.

When I got started with blogging back in 2005, I had been an interface developer for the web since 1999. The big challenges back in 2005 were convincing developers and companies to make sure that things worked in more than one web browser, and that JavaScript wasn't evil and actually pretty competent. And now, in 2018, it's back to the cross-browser support story again (JavaScript seems to be doing fine).

Granted, 2018 has just started, so let's give it a chance. But in 2017, I saw a lot of websites/apps released by a multiple of high-profile companies which only worked in one browser: Chrome. And it reminded me a lot of the days in 2005 where the story was the same, but just that back then websites only worked in Internet Explorer (document.all, anyone?).

Seeing this same story coming up again, I wanted to try and pinpoint the main reasons for why this happens, and also why it matters building for more than one web browser.

Why People Only Build for One Web Browser

In 2005, Internet Explorer still had an enormous grip on the web browser market. In September 2002, the Phoenix browser first came out, which would then evolve to Firefox, which had its 1.0 release in November 2004. Opera had already been around for a really long time, but it was first a few years into the life of Firefox that we started to see a shift in the web browser market share, and slowly, slowly, IE losing its dominance. When Chrome 1.0 came out in December 2008, it helped strengthen the movement Firefox and the community had started.

The overall motivations back then for building for only one browser was that IE had a large enough market share for decision makers to feel this would be the most cost efficient way to reach their users. Cross-browser support was occasionally hard and could lead to longer developing times. Netscape 4 and its support was drastically different from IE, and since it became irrelevant, no other browser was big enough to force them to care more deeply about it.

An extra factor that led to such an extreme dominance over the following years is that a lot of companies built IE-only Intranets with a lot of solutions dependant on proprietary APIs. Pairing that with a slow version upgrade cycle, and no other browsers allowed to be installed, this immensely held back the evolution of the web – in particular when other browsers had a much faster pace with better standards support and implementing new features.

I believe the situation in 2018 is similar to the initial mindset in 2005: one browser has a big enough piece of the market, and/or with a company's user base, and people believe it's enough to only test in that browser; that supporting more browsers means more work = higher cost and also possibly that they need APIs only supported in that browser.

Where the situation is different, though, is that now web standards support across browsers is in a much much better state, and all developers generally have a fast release and improvement pace. Chrome is also – as opposed to IE a few years in back then – at the forefront of browser evolution, together with Firefox, and Safari and Edge. They have gotten a lot better in recent times. Add to that a lot of newer browsers like Samsung Internet, Brave, and many more popping up — also holding a very high standard.

I also think, though, that in this high-pace environment, browsers implement new and experimental features, and companies are quick to jump onto them and ship new things based on them, thus leading to certain web apps only working in one browser.

Why You Should Build for all Browsers

Now that I've talked about what I believe the cause and reasoning might be, I want to tell you why I believe it is crucial that we all build for more than one web browser.

First, the number of great resources you have available now to find out what is supported where and how to do things is in a better place than it has ever been. Can I use has a lot of easily digestible information about browser support – and I was happy to work directly with Alexis (@Fyrd) who runs it to get the major Chinese browser in there as well – and then you have extremely extensive documentation and browser compatibility tables at MDN, and Chromestatus, Edge Platform Status, and Firefox Platform Status have a lot of fine-grained details on features and their implementation state. There's also Google's Web documentation, the WebKit blog, and Edge taking suggestions on UserVoice. And the Developer Tools in all web browsers are in their best shape ever with tons of tools and help for developers.

Second, instead of building for one-browser-only, or one-browser-first, if you start on the end of using standardized and implemented features across the board in the four major web browser engines there are out there, you're not only reaching more users, you are also more effectively future-proofing your website and, counter to what seems to be a common opinion, lowering the amount of technical debt or support needed by using features which are agreed on and shipped.

Third, this is the key thing that differentiates the web from anything else. It's the most global and democratic medium we have. The barrier to entry for creating and sharing is quite low and there will be no company approving what you can publish and when. And things built a long time ago mainly still work in web browsers — and this longevity is unparalleled. And when you build for just one browser, you diminish all of this to a platform by just one company. The web is bigger than that, the web is stronger than that, and I for one believe we all truly need and deserve a platform for everyone.

So, I understand your reasoning, perspective, goals, and challenges. But please, please, consider building something for the web and not just one web browser.

Deploying code to production can be filled with uncertainty. Reduce the risks, and deploy earlier and more often. Download this free guide to learn more. Brought to you in partnership with Rollbar.

Topics:
web dev ,web browsers ,cross-browser support ,chrome

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}