eli5 Why do some websites work on specific browsers? For example Chrome and not Firefox.


eli5 Why do some websites work on specific browsers? For example Chrome and not Firefox.

In: 6

Years back, websites would work only for Microsoft Internet Explorer and actually refused to work if you didn’t have that. (Fidelity Investments is one that I recall that actually displayed a message that Chrome isn’t supported and refused access).

The reasons are based on compatibility and manpower. Every browser has its own “special” functionality in CSS (for page styling) and Javascript (for interactive behavior). A company may have designed its website to take advantage of these functions that are not available in other browsers. Or they may not be willing to expend the resources to ensure that their website is compatible with all browsers, especially browsers that aren’t widely used.

It isn’t just a matter of a developer doing the work, there are more human resources required for testing and validation, each and every time the website gets an update, and each and every time any of the browsers get an update.

There’s something called “W3C,” which stands for “Word Wide Web Consortium,” think of it kind of like a web Illuminati, but instead of controlling governments it’s a bunch of nerds that decide how HTML should work. They decide on a “specification,” which basically outlines things like “if a programmer types `<img src=”someURL” />`” a web browser should display an image.

Here’s where the problem starts. The specification is just a text document, and it’s up to each browser developer to decide how they want to implement it in code. This can result in:

* Different browser implementing things slightly differently or interpreting the spec differently, producing slightly different output.
* Browser developers adding extra features that aren’t in the spec, usually so they can prototype out these features for a later proposal to add them to the official spec. These features might be handy enough web developers start to use them before they’re official, meaning that website will only work in the browser that implemented them.
* Deprecation. Technology changes, we learn more about how users behave, and we learn more about how developers can work more efficiently every day. Sometimes the way the spec was built 10 years ago isn’t how modern users/developers need websites to work these days, so new features are added, but old features are also taken away. When a feature is taken away, it’s called being “deprecated.” Some websites are older and they can’t afford (or are too cheap to) upgrade their site, so the old code can only run on older/certain browser that still supports the deprecated code.

There are probably a few more, but these are the main ones.

I think the other comments have gone over the why, but the chromium engine is what is used when testing Web site functionality.

Almost all, except Firefox and may be a few others based on Firefox, use the chromium engine

Microsoft edge, Google Chrome, Opera, Vivaldi, brave etc

Internet Explorer is gone as a browser now, but for sites that require it you can run a compatibility mode in Microsoft edge called IE mode

Think of it like cars. They all drive you down the road, but each car is a little bit different.

Some are 4WD and will perform better on hills/etc. Some may have special grip tires. Some run on electricity. Some just look fancier than others or have bells and whistles not available in others.

Browsers are the same way. All browsers at their core are created with the idea of showing web pages in all their glory, but they are all just a bit different.
Some have different “engines”. (Literally called a browser engine, responsible for much of the differences you describe), others will include extra features not necessarily supported by others (add-ons, extensions, etc.)

Internet Explorer was one of the first browsers and had several specific quirks and features that became relied upon over its long history. Some of those “features” introduced security issues that were not picked up by other browsers.
(There’s a lot more to internet explorer and its sordid history in the browser wars, but this should work for an overview-type answer.)

Consider that how a particular web page looks in a particular browser is a matter of interpretation.

For example, if you have a desk then you could interpret it as being 1.2m wide, 0.5m deep and 0.7m tall. If you were to ask someone to make you a desk and provided those values, without the specific metric, to someone that works using the metric system then their interpretation will be in line with what it’s supposed to be. If you were to give those same values to someone who uses the imperial system then what you get won’t be quite the same.

This is analogous to how sites appear differently in different browsers. There’s an organisation that defines how something should work (W3C) which releases specifications. Different browsers use different rendering engines. Some browsers use the same engines and so they will render things the same between them. When a rendering engine interprets a specification differently than some other rendering engine that’s because one or both of them have failed to implement the specification correctly.

In some cases it’s possible for the developers of the site to supply targeted instructions to misbehaving rendering engines to trick them into rendering correctly. For this reason some sites may appear to be more consistent than other sites. At that point it becomes an economic decision based on how popular a given site is vs how much time it will take to implement these workarounds.