/// <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)); }
/// <summary> /// Returns true if the browser being used is Firefox 3.5 or below. /// </summary> public static bool IsFirefox35OrBelow(this HttpBrowserCapabilities browser) { return(browser.isFirefox() && browser.MajorVersion + browser.MinorVersion < 3.6); }