Instantly share code, notes, and snippets.

@jacobrossi /Win10IEUAString Secret
Last active Apr 1, 2018

Embed
What would you like to do?
Windows 10 Technical Preview IE UA String
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
@paulirish

This comment has been minimized.

Show comment
Hide comment
@crswll

This comment has been minimized.

Show comment
Hide comment
@crswll

crswll Jan 22, 2015

Holy smokes.

crswll commented Jan 22, 2015

Holy smokes.

@getify

This comment has been minimized.

Show comment
Hide comment
@getify

getify Jan 22, 2015

Hoooray! More nails in the coffin of UA strings, which need to die. This UA string is a hilarious troll on the rest of the market. I love it!

getify commented Jan 22, 2015

Hoooray! More nails in the coffin of UA strings, which need to die. This UA string is a hilarious troll on the rest of the market. I love it!

@Fyrd

This comment has been minimized.

Show comment
Hide comment
@Fyrd

Fyrd Jan 22, 2015

One thing I find interesting is that IE itself somehow never made it in this list. Maybe something to strive for in the future. ;)

Fyrd commented Jan 22, 2015

One thing I find interesting is that IE itself somehow never made it in this list. Maybe something to strive for in the future. ;)

@bevacqua

This comment has been minimized.

Show comment
Hide comment
@bevacqua

bevacqua Jan 22, 2015

Love how it mentions every user agent ever, except for IE.

bevacqua commented Jan 22, 2015

Love how it mentions every user agent ever, except for IE.

@antpaw

This comment has been minimized.

Show comment
Hide comment
@antpaw

antpaw Jan 22, 2015

How does it helps to kill UA string?
IE10 = true if UAstring.has? 'Mozilla', 'Chrome', 'Safari'
I'm sure this is what some peoples code soon going to be look like.

antpaw commented Jan 22, 2015

How does it helps to kill UA string?
IE10 = true if UAstring.has? 'Mozilla', 'Chrome', 'Safari'
I'm sure this is what some peoples code soon going to be look like.

@casarock

This comment has been minimized.

Show comment
Hide comment
@casarock

casarock Jan 22, 2015

Well, Opera has something like this:
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 OPR/15.0.1147.153

Spartan has less... ;)

casarock commented Jan 22, 2015

Well, Opera has something like this:
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 OPR/15.0.1147.153

Spartan has less... ;)

@3rd-Eden

This comment has been minimized.

Show comment
Hide comment
@3rd-Eden

3rd-Eden Jan 22, 2015

IE = /(Edge)\/(\d+)\.(\d+)/.exec(navigator.userAgent)

Not that hard to detect tbh.

3rd-Eden commented Jan 22, 2015

IE = /(Edge)\/(\d+)\.(\d+)/.exec(navigator.userAgent)

Not that hard to detect tbh.

@triblondon

This comment has been minimized.

Show comment
Hide comment
@triblondon

triblondon Jan 22, 2015

Is this the UA that will be emitted by the browser currently known as project Spartan?

Whatever that turns out to be, it's a fair bet it will start with "Mozilla", avoid including the string "msie" and likely toss in some magic strings like "chrome" and "safari".

This is hurting the web. There are good, sensible reasons for wanting to positively ID a browser, not least of which is the fact that feature detection doesn't mean the feature works. There are thousands of cases of feature detects combined with a sneaky (and usually flawed) UA sniff to exclude a browser which passes the feature detect but is known to have a buggy implementation. There are proprietary extensions that only exist in some browsers. There are implementations that are buggy in some browsers in very specific ways. There are features implemented to early specs which then changed.

With the polyfill service I and others are trying to provide a tool to correct those flaws, but you cannot do it accurately or efficiently with feature detection. We would all benefit if user agents were to honestly, accurately and uniquely identify themselves.

I understand that some sites have bad UA parsing. But Microsoft has had similar problems before and found a solution: when IE8 fixed bugs sites were relying on, you added compatibility mode, and a blacklist of sites that would get switched to it by default. Here we need the same thing. So why not be the trailblazer here: set the new UA string to "/" and start a crowd sourced database of sites that require a legacy UA. Have the browser refresh its list daily or weekly.

triblondon commented Jan 22, 2015

Is this the UA that will be emitted by the browser currently known as project Spartan?

Whatever that turns out to be, it's a fair bet it will start with "Mozilla", avoid including the string "msie" and likely toss in some magic strings like "chrome" and "safari".

This is hurting the web. There are good, sensible reasons for wanting to positively ID a browser, not least of which is the fact that feature detection doesn't mean the feature works. There are thousands of cases of feature detects combined with a sneaky (and usually flawed) UA sniff to exclude a browser which passes the feature detect but is known to have a buggy implementation. There are proprietary extensions that only exist in some browsers. There are implementations that are buggy in some browsers in very specific ways. There are features implemented to early specs which then changed.

With the polyfill service I and others are trying to provide a tool to correct those flaws, but you cannot do it accurately or efficiently with feature detection. We would all benefit if user agents were to honestly, accurately and uniquely identify themselves.

I understand that some sites have bad UA parsing. But Microsoft has had similar problems before and found a solution: when IE8 fixed bugs sites were relying on, you added compatibility mode, and a blacklist of sites that would get switched to it by default. Here we need the same thing. So why not be the trailblazer here: set the new UA string to "/" and start a crowd sourced database of sites that require a legacy UA. Have the browser refresh its list daily or weekly.

@nickshanks

This comment has been minimized.

Show comment
Hide comment
@nickshanks

nickshanks Jan 22, 2015

@triblondon I presume the IE team have found that the number of extant sites where a naïve UA detection is used as feature selector outweigh (both in quantity and collective importance) the sites that use both explicit feature detection coupled with UA identification to exclude UAs with buggy implementations. That this hinders future interoperable website development is a trade-off they were willing to make.

nickshanks commented Jan 22, 2015

@triblondon I presume the IE team have found that the number of extant sites where a naïve UA detection is used as feature selector outweigh (both in quantity and collective importance) the sites that use both explicit feature detection coupled with UA identification to exclude UAs with buggy implementations. That this hinders future interoperable website development is a trade-off they were willing to make.

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jan 22, 2015

See this blog post for the crazy UA sniffing that some people do, it's no wonder IE has to mention every browser. I agree that UA sniffing can be useful in some cases. The problem is that it's been abused and the abusers have fled the scene or just don't care, leaving the browser makers to fiddle with the UA so their users don't suffer. It's not just IE either, Chrome mentions Gecko and Safari for a reason.

dmethvin commented Jan 22, 2015

See this blog post for the crazy UA sniffing that some people do, it's no wonder IE has to mention every browser. I agree that UA sniffing can be useful in some cases. The problem is that it's been abused and the abusers have fled the scene or just don't care, leaving the browser makers to fiddle with the UA so their users don't suffer. It's not just IE either, Chrome mentions Gecko and Safari for a reason.

@victor-homyakov

This comment has been minimized.

Show comment
Hide comment
@victor-homyakov

victor-homyakov Jan 22, 2015

Microsoft, be brave! Let it be just "Edge/12.0"!

victor-homyakov commented Jan 22, 2015

Microsoft, be brave! Let it be just "Edge/12.0"!

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Jan 22, 2015

Can we please deprecate UA strings already?

Here's wishing for something like navigator.supports.{feature}.

silverwind commented Jan 22, 2015

Can we please deprecate UA strings already?

Here's wishing for something like navigator.supports.{feature}.

@dmethvin

This comment has been minimized.

Show comment
Hide comment

dmethvin commented Jan 22, 2015

@jrodl3r

This comment has been minimized.

Show comment
Hide comment
@jrodl3r

jrodl3r Jan 22, 2015

@silverwind after they all agree to do that in 10 years, IE will insist on using different feature-names.

jrodl3r commented Jan 22, 2015

@silverwind after they all agree to do that in 10 years, IE will insist on using different feature-names.

@lyzadanger

This comment has been minimized.

Show comment
Hide comment
@lyzadanger

lyzadanger Jan 22, 2015

There must be an entire field emerging: UA archaeologist and lore historian. It's starting to read like the "begats" in the bible. All browsers much connect their lineage to Konqueror or face a lack-of-legitimacy crisis!

lyzadanger commented Jan 22, 2015

There must be an entire field emerging: UA archaeologist and lore historian. It's starting to read like the "begats" in the bible. All browsers much connect their lineage to Konqueror or face a lack-of-legitimacy crisis!

@jacobrossi

This comment has been minimized.

Show comment
Hide comment
@jacobrossi

jacobrossi Jan 24, 2015

Honestly, we wish the UA string didn't have to be a lie (though it is in every browser). If the tokens were stickers, then this looks like the back of my laptop! But this is a necessary change. The reality is that our new engine, EdgeHTML, is further diverged from Trident than even Blink is from WebKit. So its necessary to break those ties. Further, today's web just doesn't work unless you have these other tokens. The number of broken sites is in the thousands. It's also worth noting that we're not just slapping these in there with nothing else, these Chrome/Safari tokens come along with a commitment to quadruple down on interoperability with these browsers. To date, we've made over 3000 interop fixes and are adding over 40 new standards, which makes these tokens more of a white lie. :) Rest assured we understand sniffing is occasionally necessary. We will absolutely maintain a way to confidently identify the new engine (look for "Edge").

Owner

jacobrossi commented Jan 24, 2015

Honestly, we wish the UA string didn't have to be a lie (though it is in every browser). If the tokens were stickers, then this looks like the back of my laptop! But this is a necessary change. The reality is that our new engine, EdgeHTML, is further diverged from Trident than even Blink is from WebKit. So its necessary to break those ties. Further, today's web just doesn't work unless you have these other tokens. The number of broken sites is in the thousands. It's also worth noting that we're not just slapping these in there with nothing else, these Chrome/Safari tokens come along with a commitment to quadruple down on interoperability with these browsers. To date, we've made over 3000 interop fixes and are adding over 40 new standards, which makes these tokens more of a white lie. :) Rest assured we understand sniffing is occasionally necessary. We will absolutely maintain a way to confidently identify the new engine (look for "Edge").

@z-eh

This comment has been minimized.

Show comment
Hide comment
@z-eh

z-eh Jan 24, 2015

It's just some compatibility issue. We have Mozilla keyword in IE UA string from IE9, now we also have Safari and AppleWebKit for the same. :)

z-eh commented Jan 24, 2015

It's just some compatibility issue. We have Mozilla keyword in IE UA string from IE9, now we also have Safari and AppleWebKit for the same. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment