News for hackers. Stuff that matters.
Re:The ups and downs of the HTTP header by IgorPartola on Friday December 06, 2013 @11:29AM (#6861861)
Why is the UA header so screwed up, aside from the historical issues with it? Isn't it time that we replace it with something a bit more sane and structured? It seems the idea of detecting the browser vs detecting browser features goes back and forth. Sure, on the client side, where you have access to the DOM and the JavaScript runtime, it's great to know whether you can use the placeholder attribute in a text input, but server-side you need to decide which video file to serve to the client, and this gets tricky.

Instead, why don't we have something like this?:

    OS: Windows
    OS-Version: 8.1
    Browser: Chrome
    Browser-Version: 18.5
(Not suggesting the format, just the type of data.)

That way we can ditch the stupid stuff such as "like Gecko" which means nothing, and focusing on actual useful things.

Re:The ups and downs of the HTTP header by _greim_ on Friday December 06, 2013 @12:43PM (#6862357)
Web developers have historically tended to write shitty UA detection logic en masse, which has in turn incentivized browser makers to carefully craft UAs to break as few of them as possible. Basically, avoiding the all-too-common "this site requires IE6 or higher" message when you visit a site in IE11. The same situation would likely develop with the proposal above, which is essentially no different from the original intent for UA strings. The most viable option would be for all browser makers to just simultaneously disable them. Like a band-aid; right off!
Re:The ups and downs of the HTTP header by Keithamus on Saturday December 07, 2013 @06:58AM (#6866208)
Given your scenario of serving the right video to browsers, you shouldn't need to do UA sniffing because the browser should have the right accept headers so you can do proper content negotiation.

UAs these days should only be good for one thing, which is analytics. The browser should provide all the necessary information for other stuff through its other headers, such as Accept. Of course, I emphasise should because there's a wee bit of fantasy in that statement.

Re:The ups and downs of the HTTP header by noselasd on Friday December 06, 2013 @01:13PM (#6862533)
Your suggestion will work for a few years perhaps, and then it'll deteriorate to the current state over time.