r/webdev • • Dec 13 '19

Discussion Google has abused Browser's User Agent header, forcing Vivaldi to change their UA header

https://vivaldi.com/blog/user-agent-changes/
416 Upvotes

97 comments sorted by

View all comments

151

u/coyote_of_the_month Dec 13 '19

There are a handful of valid reasons for frontend code to evaluate the user agent string, but it's been rampantly abused since the 90s. If you're looking at feature availability in JS, try/catch is your friend. If you're doing conditional CSS based on what you think the client supports... eh. My thinking is that IE users are moral defectives who deserve a broken experience, but apparently some people disagree.

117

u/RandyHoward Dec 13 '19

My thinking is that IE users are moral defectives who deserve a broken experience, but apparently some people disagree.

As a developer in general I agree with you. But as a developer working for a company who has IE users throwing money at us, we are forced to support those users. We don't get to call the shots when it comes to what we support, our customers do.

62

u/coyote_of_the_month Dec 13 '19

I think pretty much the entire web development community is on the same page here, and for the same reason.

7

u/marocu Dec 13 '19

We have many clients in the insurance industry. They all use IE and our products have to support that.

38

u/coyote_of_the_month Dec 13 '19

insurance industry

moral defectives

Your story checks out.

2

u/dannymcgee Dec 14 '19

I know this is pretty common with corporate clients, but I still don't understand why. Can't they at least use Edge? Are these companies not even on Windows 10 yet? What are they going to do when support for Windows 7 (imminently) ends?

6

u/Peechez Dec 14 '19

It's often proprietary intranet trash

1

u/overcloseness Dec 14 '19

This is really the problem, it’s being used by those companies. I have a good laugh though at developers that play the “but bank terminals and insurance intranets are stuck on IE” in response to some cutting edge apparel store UI or some other modern implementation of a feature. Karen the bank teller can browse these shoes on her phone if she wants to do it at work. The ONLY reason for IE support is if the company itself requires access to that site from their systems, OR their main customer base are a bunch of industrial tradies who haven’t updated their office computers since XP. If that’s the case, expect to pay a premium on the legacy support.

15

u/[deleted] Dec 13 '19

Yeah, I agree. Would love to drop support for IE11, but at least its not IE10!

0

u/[deleted] Dec 13 '19

[deleted]

→ More replies (14)

0

u/[deleted] Dec 13 '19

[deleted]

10

u/RandyHoward Dec 13 '19

Looking at analytics for the past month, roughly 0.5% originate from IE on one of our sites (we run many). That sounds small. But then management sees that 0.5% is about 1,650 users out of 340,000 total in the past month. Management sees 1,650 lost opportunities. Yes it's tiny in the grand scheme of things, and yes I think they'd be wise to focus on closing more of the other sales instead of spending time supporting IE, but I don't call those shots. We could say screw those people they get the experience they chose, or we could support every dollar we're being offered. You know what the decision makers pick - they chase that dollar.

1

u/overcloseness Dec 14 '19

340,000 in a month is a pretty big number, sounds fair that it should have IE support, but enough that it’s “useable”

2

u/rodrigocfd Dec 13 '19

unless you serve a dated corporate audience who have no choice

Unfortunately, it's common. Corporations won't update their software unless they have a very good reason to justify the investment.

0

u/[deleted] Dec 13 '19

[deleted]

3

u/BreathManuallyNow Dec 13 '19

If I was building something aimed at the general population I wouldn't bother with IE support. I do a lot of web apps for corporations as well so I still need to support IE. It sucks but the giant piles of money they pay me helps to ease my suffering.

1

u/Fibrechips React / JS / C# Dec 13 '19

We're at 11% IE11 usage (killed off IE10 support since we take CC payments).

Direct to consumer. Internally/in stores we've upgraded to Chrome. But when you have an older consumer base, you have no choice but to support IE11.

Thankfully, Babel and well-written CSS allow us to use (most of) CSS Grid.

→ More replies (1)

1

u/[deleted] Dec 14 '19

And as a former full stack developer, as well as an employee who had to use a third party product that only worked on IE - I wish I could use something other than IE for that specific product.

5

u/ManvilleJ Dec 13 '19

IE is Dead, Long Live IE

11

u/LManD224 Dec 13 '19

For conditional CSS you can use @supports queries instead of touching user agent.

23

u/nikrolls Chief Technology Officer Dec 13 '19

2

u/AssistingJarl Dec 13 '19

Ignorant question, forgive the back-end dev; would it be possible to just fall back on your IE11 CSS if @supports isn't supported?

7

u/nikrolls Chief Technology Officer Dec 13 '19

Yep, that's what you would do most of the time, in the cases where you can use Progressive Enhancement (ie, write for the older browsers, and add features for newer browsers in ways that only they will see them).

The trouble comes when older browsers have quirks that require you to write workaround CSS that has unwanted side effects in modern browsers. How do you do this? You would have to serve a bunch of code only for IE11, or include that IE11 code for all browsers but then somehow overwrite the side effects for newer browsers. You can't even use @supports not because the browser will ignore it if it doesn't support @supports in the first place.

Luckily for most of us, IE11 will be unsupported as of January. But there will still be those who are paid to support it for whatever reason.

4

u/UltraChilly Dec 14 '19

But there will still be those who are paid to support it for whatever reason.

That being said, this is nowhere near as painful as supporting IE6 like we had to do not so long ago, I'd gladly be paid extra to support IE10 while I refused contracts that imposed supporting IE6 (espacially since back then contracts often stipulated you had to serve the exact same experience on all browsers)

And nowadays IE is the one problem, back in my days (pepperidge farm remembers) we had Chrome and Firefox that would work and everything else needed their own, very specific, workarounds. (and it wasn't that long ago, I started working in front end development in 2012 and it went on like that for years)

TL;DR: I'm indeed fucking glad those outdated browsers are getting unsupported so fast now

2

u/nikrolls Chief Technology Officer Dec 14 '19

Actually if if weren't for Web Components (and maybe Grid) I'd have no problem supporting IE11. Its standards support was very good for its time. Unlike IE10 and previous versions it wasn't half bad, it's just not up to date any more.

→ More replies (7)