Live data from Hacker News

Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

thurrott.com

61–70 of 207 posts

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#61

Most likely a user-agent check to ensure compatibility. I don't assume any ill intent. That being said, what does annoy me is that we've known for years that feature detection is preferable to user-agent detection, and I would kind of expect one of the biggest web development companies in the world to be following best practices. This isn't my local pizza shop, Google engineers should know better. Have they already f…

In my experience, while many people don't like to admit it, useragent detection is still one of the best ways to handle many bugs and edge cases in large applications. Feature detection works well for new features or well documented failures, but it quickly begins to break down in many edge cases. For example, mobile Safari shipped a broken implementation of IndexedDB for a while and detecting that was a big pain, bu…

To a certain extent I feel your pain and get where you're coming from. The problem is --

A) The user agent isn't always specific enough. I've run into rendering bugs that were specific not just to individual browser versions, but individual browser versions on specific platforms. I've seen bugs fixed and introduced that didn't trigger user agent updates.

B) Browsers lie about their user agents. Firefox fingerprint protection normalizes the browser version reported in the user-agent to reduce the amount of information leaked.

So yes, agent checks can be useful. I've used user agent checks to reduce CPU-heavy animations on older versions of IE, or target rendering bugs that literally can't be detected any other way. I get it. But when I apply those checks, I'm doing it in the spirit of progressive enhancement -- and recognizing that those checks are error prone and might fail in the future. I never gate an entire application behind a whitelist or blacklist.

Bear in mind, all of the stuff you're talking about falls under the category of "I've found a bug in a weird situation and I just want to try and figure out if I'm in that situation." Not, "I've found the X situations where my site works, and it will only work in those situations." Very different approaches to web development.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#62

Earlier quoted context omitted.

In my experience, while many people don't like to admit it, useragent detection is still one of the best ways to handle many bugs and edge cases in large applications. Feature detection works well for new features or well documented failures, but it quickly begins to break down in many edge cases. For example, mobile Safari shipped a broken implementation of IndexedDB for a while and detecting that was a big pain, bu…

Could you try the faulty operation and see if it failed?

Sometimes, but not always...

For example, the Edge bug was at [1]. It didn't reproduce when the devtools were open, it only happened if the optimizer tried to optimize it which was non-deterministic, and it would only trigger in some cases in pretty weird spots with a lot of supporting code.

Feature detecting that would be a nightmare, but UA detecting it (since I now know the exact versions impacted) is super easy and simple and the fix is extremely small. I don't have that in our codebase any more, but it was a perfect example of a bug which can't easily be feature-detected.

[1] https://github.com/microsoft/ChakraCore/issues/1415

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#64
post #22

I spoofed my user agent as chrome, and it works fine. I'm using the latest Edge Canary

This kind of shenanigan is why everyone should have a user-agent spoofer on their browser. I even think Firefox should ship with it natively.

Far too many sites ban non-Chromium (sometimes even non-Chrome) browsers.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#65
post #54

Most likely a user-agent check to ensure compatibility. I don't assume any ill intent. That being said, what does annoy me is that we've known for years that feature detection is preferable to user-agent detection, and I would kind of expect one of the biggest web development companies in the world to be following best practices. This isn't my local pizza shop, Google engineers should know better. Have they already f…

Disclaimer: I work at Google but not on YouTube, speaking in a personal capacity. Long story short, it doesn’t really work this way. As an example, go to google.com on Internet Explorer 6. No, I’m serious. You will find that it loads just fine and even functions, over plain HTTP. It’s only a small subset of functionality, but it does actually work. You can’t do that with feature detection. YouTube may have crossed th…

> You can’t do that with feature detection.

This... is just wrong. If you start from that base feature set that works on all browsers, and then utilize feature detection to progressively enhance the experience, you can definitely do just what this statement says.

Its just easier to rely on UA sniffing, but don't spread misinformation that it isn't possible. It is a LOT more work, particularly to ensure that the experience is a good as possible on both ends of the spectrum.

It's possible that there is better performance using UA sniffing, as the server can decide what code subset to send. So I don't discount it as a potentially valid solution, but just not as "the only way". Thinking like that is how we end up in situations where "best viewed in ... browser" happens.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#66

Earlier quoted context omitted.

In my experience, while many people don't like to admit it, useragent detection is still one of the best ways to handle many bugs and edge cases in large applications. Feature detection works well for new features or well documented failures, but it quickly begins to break down in many edge cases. For example, mobile Safari shipped a broken implementation of IndexedDB for a while and detecting that was a big pain, bu…

To a certain extent I feel your pain and get where you're coming from. The problem is -- A) The user agent isn't always specific enough. I've run into rendering bugs that were specific not just to individual browser versions, but individual browser versions on specific platforms. I've seen bugs fixed and introduced that didn't trigger user agent updates. B) Browsers lie about their user agents. Firefox fingerprint pr…

Yeah I don't support gating entire sites behind checks like this outside of some situations (like it's a tech demo using a new browser API, or a public beta where they want to limit it to a few browsers until it's stable enough to open up to the world).

But I also absolutely get the allure of whitelisting "known good browsers". I've literally never seen a user hit a bug, and then blame their browser. Hell, I've personally hit bugs and blamed the website only to find out later that it was a browser bug. It's a shitty situation all around, and I don't have a good universal answer. I try to avoid doing that at all costs, but I also have to admit that a piece of software I currently work on is gated to only Chrome and Safari due to the extreme number of bugs that were coming from alternate browsers and the fact that we simply don't have the time to chase them down right now.

It sucks, I feel bad about doing it, and I don't want anyone else to do it for many reasons (including the health of the web in general), but until I personally can find a good way out, I also can't in good conscience be mad at others for doing the same thing.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#67

Earlier quoted context omitted.

In my experience, while many people don't like to admit it, useragent detection is still one of the best ways to handle many bugs and edge cases in large applications. Feature detection works well for new features or well documented failures, but it quickly begins to break down in many edge cases. For example, mobile Safari shipped a broken implementation of IndexedDB for a while and detecting that was a big pain, bu…

Could you try the faulty operation and see if it failed?

The problem is you can't reliability detect non-deterministic bugs, so in those cases you essentially have to use the UA to decide if you can use them.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#68
post #54

Earlier quoted context omitted.

Disclaimer: I work at Google but not on YouTube, speaking in a personal capacity. Long story short, it doesn’t really work this way. As an example, go to google.com on Internet Explorer 6. No, I’m serious. You will find that it loads just fine and even functions, over plain HTTP. It’s only a small subset of functionality, but it does actually work. You can’t do that with feature detection. YouTube may have crossed th…

> You can’t do that with feature detection. This... is just wrong. If you start from that base feature set that works on all browsers, and then utilize feature detection to progressively enhance the experience, you can definitely do just what this statement says. Its just easier to rely on UA sniffing, but don't spread misinformation that it isn't possible. It is a LOT more work, particularly to ensure that the exper…

No, when I say you can’t, I really mean you can’t. If you try visiting https://google.com in IE6, you get the other part of the problem. It doesn’t work. The cipher suites are too old.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#69

Earlier quoted context omitted.

In my experience, while many people don't like to admit it, useragent detection is still one of the best ways to handle many bugs and edge cases in large applications. Feature detection works well for new features or well documented failures, but it quickly begins to break down in many edge cases. For example, mobile Safari shipped a broken implementation of IndexedDB for a while and detecting that was a big pain, bu…

To a certain extent I feel your pain and get where you're coming from. The problem is -- A) The user agent isn't always specific enough. I've run into rendering bugs that were specific not just to individual browser versions, but individual browser versions on specific platforms. I've seen bugs fixed and introduced that didn't trigger user agent updates. B) Browsers lie about their user agents. Firefox fingerprint pr…

The problem I see often is when sites would use whitelists,l so when you use a less popular browser you get the use Chrome page. At least put a banner that my browser is not supported but let me try the page.

Re: Google Now Forces Edge Preview Users to Use Chrome for the Modern YouTube

#70

Most likely a user-agent check to ensure compatibility. I don't assume any ill intent. That being said, what does annoy me is that we've known for years that feature detection is preferable to user-agent detection, and I would kind of expect one of the biggest web development companies in the world to be following best practices. This isn't my local pizza shop, Google engineers should know better. Have they already f…

Disclaimer: I work at Google but not on YouTube, also speaking just personally.

This isn’t practical at all in a latency sensitive environment. Feature detection works once JavaScript has loaded on the page, which means we either have to serve you a giant bundle of stuff you may not be able to use, or we have to degrade the experience of the latest browsers by detecting features and fetching more HTML/CSS/JavaScript once we know they will be able to handle it.

Feature detection absolutely is used for some things, but it’s unreasonable from a latency perspective to serve the bundle of all possible sites and make all these decisions on the client. We aren’t talking about polyfills here- A lot of these features mean we are shipping a totally differently lay out because this webkit uses flex box 2009, or mobile safari 8 has a layout bug, or IE has a quirk around event bubbling in video elements, etc.

Feature detection stops being better when a) your supported browser list stretches into the early 2000s around the world and b) you are in a latency sensitive environment where it is unacceptable to degrade performance of the latest browsers. If you aren’t bound by those constraints, or the detection has a cheap fallback so it isn’t meaningfully impacting latency, I agree with feature detection.

Post reply on HN