IE11, user agent sniffing vs feature detection

I recently found a bug in curvycorners.js and IE11 – curvycorners uses user agent sniffing to detect ie browsers by looking for the presence of ‘msie’. However the IE11 user agent has changed and become far more complicated to sniff! This blog explains the changes:

http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx

User Agent sniffing seems to be a common way of detecting the browser and version in order to target code at certain browsers, however it is far from ideal. This blog gives a good overview of why it is not a good idea. It also give an overview of┬áthe alternative – feature detection

http://msdn.microsoft.com/en-us/library/ie/hh273397(v=vs.85).aspx

For a much more detailed blog on feature detection see:

http://msdn.microsoft.com/en-us/magazine/hh475813.aspx

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">