Live data from Hacker News

User agent overrides for top Japanese Sites

bugzilla.mozilla.org

11–20 of 42 posts

Re: User agent overrides for top Japanese Sites

#11
Fennec dev here. Figured I'd address some of these comments.

UA overrides are not the only tool in our toolbox. They're deployed in concert with outreach from webcompat.

UA overrides are a way of breaking a cycle, not preserving it.

They make it feasible for Japanese users to use Firefox without manually messing around with UA overrides (e.g., using Phony). And that gives us leverage. And with leverage our excellent webcompat team can get sites to make changes.

Re: User agent overrides for top Japanese Sites

#12
Things like Modernizr and feature detection are great, but I'm excited to see what happens when coeffects [1] have some more research behind them, and end up being supported by a mainstream programming language.

The idea is that you're able to encode information about the execution environment into the type system, so that you can do things like write functions that depend on having access to GPS coordinates, or an audio output device, and so on.

The theory is that this will make it easier to target a wide variety of platforms, or devices which may restrict access to information through permissions systems, like those offered by Android or iOS. If, at compile time, you know you've handled all of the cases of an environmental constraint either being met, or not being met, then you have a much stronger guarantee that your code isn't going to unexpectedly fail spectacularly on a platform you haven't tested against.

[1] http://tomasp.net/blog/2014/why-coeffects-matter/

Re: User agent overrides for top Japanese Sites

#13

UA overrides are enabling the poor web design that necessitates them. If web sites aren't punished for doing the wrong thing they'll keep doing, requiring more overrides, which hides the bugs, etc. Stop this feedback loop. The client is not responsible for the server's bugs.

Hi, I disagree (not just because I authored the patch linked here). Web sites are never punished. Our users are.

Re: User agent overrides for top Japanese Sites

#14
post #5

It's an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft's new browser does this by default [1][2]. As a user, I'd love to see a day when browsers don't reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven't fully considered the collateral damage that might come with that.…

Sniffing User-Agent has been poor practice since 2011 , in favour of feature detection using a library like Modernizr. I used to advocate using something like Modernizr and then writing your code against the results, but now I think an even more straightforward approach is to just do the feature detection you wish to use directly in your code. No sense in loading in a library and testing for things you don't need, st…

You don't have to include the whole library. Modernizr allows you to customize the package to only detect for features you need.

While writing your own feature detection is still probably lightweight (although not by much if you customize modernizr correctly), you're not going to get all the edgecases Modernizr will unless you spend A LOT of time on it.

http://modernizr.com/download/

Re: User agent overrides for top Japanese Sites

#15

It's an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft's new browser does this by default [1][2]. As a user, I'd love to see a day when browsers don't reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven't fully considered the collateral damage that might come with that.…

IE has spoofed Mozilla browsers since at least IE2. When was the last time you saw a browser that didn't claim to be Mozilla/5.0?

Re: User agent overrides for top Japanese Sites

#16

It's an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft's new browser does this by default [1][2]. As a user, I'd love to see a day when browsers don't reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven't fully considered the collateral damage that might come with that.…

Almost daily I have to spoof my User Agent to claim to be an iPad due to sites confidently proclaiming that Flash is """required""" to get at some audio/video content. What do you know, spoof User Agent, and their Flash """requirement""" instantly evaporates. Pet peeve.

Re: User agent overrides for top Japanese Sites

#17

It's an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft's new browser does this by default [1][2]. As a user, I'd love to see a day when browsers don't reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven't fully considered the collateral damage that might come with that.…

IE has spoofed Mozilla browsers since at least IE2. When was the last time you saw a browser that didn't claim to be Mozilla/5.0?

I didn't think there was a Mozilla browser until after IE4 came out...

Re: User agent overrides for top Japanese Sites

#18
post #3

It's an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft's new browser does this by default [1][2]. As a user, I'd love to see a day when browsers don't reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven't fully considered the collateral damage that might come with that.…

Agreed re feature detection. This could lead to an uncomfortable world for devs where the UA becomes completely unreliable - may force a migration to feature detection.

I've got bad news for you. We've been at this stage for years already. UA strings are already broken beyond repair.

http://www.useragentstring.com/pages/Browserlist/

Re: User agent overrides for top Japanese Sites

#19
post #5

It's an unfortunate state of affairs when a modern browser has to spoof another browser just to get the right content. The user agent in Microsoft's new browser does this by default [1][2]. As a user, I'd love to see a day when browsers don't reveal their user agents and web developers rely on feature detection instead. I admit, though, that I haven't fully considered the collateral damage that might come with that.…

Sniffing User-Agent has been poor practice since 2011 , in favour of feature detection using a library like Modernizr. I used to advocate using something like Modernizr and then writing your code against the results, but now I think an even more straightforward approach is to just do the feature detection you wish to use directly in your code. No sense in loading in a library and testing for things you don't need, st…

> Sniffing User-Agent has been poor practice since 2011

I'm old enough to remember it was much earlier than that. In the early '00s there were already calls to do feature detection; jQuery was released in 2006 and it basically did it for you. In 2015, there is no excuse to do UA sniffing -- if anything, because we now have 20 years of case-history showing people will trivially spoof it.

Re: User agent overrides for top Japanese Sites

#20

Earlier quoted context omitted.

IE has spoofed Mozilla browsers since at least IE2. When was the last time you saw a browser that didn't claim to be Mozilla/5.0?

I didn't think there was a Mozilla browser until after IE4 came out...

But there was a Mozilla engine, which is what Navigator had in its UA and Explorer spoofed.
Post reply on HN