Tuesday, November 19, 2013

Browser Identification Insanity

As if programming for IE and Chrome and Safari and Firefox was not challenging enough; a few months back Windows Update brought a change into our development web server that convinced the .Net framework that Chrome, Safari, and other non-IE and non-Firefox browsers, were down level browsers. 

This led me to create the new function ShowClientInfo which displays information about the current browser.



The Version Information, Capabilities Detail, and Screen Information sections show how ASP.NET is treating the client browser.  This is not based upon realtime information from the browser but is looked up from tables in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers based on ASP.NET's parsing of the User Agent string which does come 'live' from the browser, as does the Accept Types and top user language setting.


The CSS Device Type Detection section shows the results of the m2kMobile.css media queries and is only available on mobile devices (when the m2kMobile.css is rendered).  This is useful for verifying which RWD CSS rules are being applied.


The Javascript Diagnostics are based on the qunit.js javascript unit test framework and provide visibility of which versions of libraries are loaded, as well as, unit tests of key Manage 2000 web client javavscript operations along with some performance timings.  These diagnostics can provide a level of confidence in the javascript capabilities and performance of new or unique client hardware, as well as, confirmation of proper javascript library configuration.

So it is a bit of a smorg-as-borg, but hopefully will tell you everything you need to know about what the Manage 2000 8.0 web site thinks about that device you hold in your hand... or wherever.

No comments: