dist/jquery.documentsize.js
function getIEVersion () {
        var userAgent, userAgentTestRx;

        if ( ieVersion === undefined ) {

            ieVersion = false;
            userAgent = navigator && navigator.userAgent;

            if ( navigator && navigator.appName === "Microsoft Internet Explorer" && userAgent ) {
                userAgentTestRx = new RegExp( "MSIE ([0-9]{1,}[\.0-9]{0,})" );                          // jshint ignore:line
                if ( userAgentTestRx.exec( userAgent ) != null ) ieVersion = parseFloat( RegExp.$1 );
            }

        }

        return ieVersion;
    }
function getIEVersion () {
        var userAgent, userAgentTestRx;

        if ( ieVersion === undefined ) {

            ieVersion = false;
            userAgent = navigator && navigator.userAgent;

            if ( navigator && navigator.appName === "Microsoft Internet Explorer" && userAgent ) {
                userAgentTestRx = new RegExp( "MSIE ([0-9]{1,}[\.0-9]{0,})" );                          // jshint ignore:line
                if ( userAgentTestRx.exec( userAgent ) != null ) ieVersion = parseFloat( RegExp.$1 );
            }

        }

        return ieVersion;
    }
function getIEVersion ( ) { var userAgent , userAgentTestRx ; if ( ieVersion === undefined ) { ieVersion = false ; userAgent = navigator && navigator . userAgent ; if ( navigator && navigator . appName === "Microsoft Internet Explorer" && userAgent ) { userAgentTestRx = new RegExp ( "MSIE ([0-9]{1,}[\.0-9]{0,})" ) ; // jshint ignore:line if ( userAgentTestRx . exec ( userAgent ) != null ) ieVersion = parseFloat ( RegExp . $1 ) ; } } return ieVersion ; }
Returns the IE version, or false if the browser is not IE.

The result is determined by browser sniffing, rather than a test tailored to the use case. The function must only
be called as a last resort, for scenarios where there is no alternative to browser sniffing.

These scenarios include:

- Preventing IE6 and IE7 from crashing
- Preventing IE9 from blocking or delaying the load event

The test follows the MSDN recommendation at https://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx#parsingua
The result is cached.

@returns {number|boolean}
Returns the IE version or false if the browser is not IE .