Exemplo n.º 1
0
        /// <summary>
        /// Returns true if the user has an old version of Firefox or IE. Chrome updates itself, and users of other browsers like Opera
        /// probably know what they are doing.
        /// </summary>
        public static bool IsOldVersionOfMajorBrowser(this HttpBrowserCapabilities browser)
        {
            const int latestIeVersion      = 9;
            const int latestFirefoxVersion = 4;

            return((browser.IsInternetExplorer() && browser.MajorVersion < latestIeVersion) || (browser.isFirefox() && browser.MajorVersion < latestFirefoxVersion));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Returns true if the browser being used is IE7.
 /// </summary>
 public static bool IsInternetExplorer7(this HttpBrowserCapabilities browser)
 {
     return(browser.IsInternetExplorer() && browser.Version.StartsWith("7"));
 }