Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
function runBrowserCheck()
{
  var bIE = false;
  var iBrowserType = -1;
  var iBogusBrowserVariant = 0;

  var cUserAgent = window.navigator.userAgent;
  var cAppName = window.navigator.appName;

  bIE = (cUserAgent.indexOf("msie") >= 0);

  if (bIE)
  {
    //IE8
    if (cUserAgent.indexOf("MSIE 8.0") >= 1)
        iBrowserType = 5;
    if (cUserAgent.indexOf("MSIE 9.0") >= 1)
        iBrowserType = 5;
  }
}


I am using this jquery to check browser compatibility,but it Shows Internet explorer browser incompatibility issue.
Posted
Updated 11-Nov-14 1:54am
v3
Comments
jkirkerx 11-Nov-14 19:07pm    
Microsoft went out of there way to make IE 10 and 11 none detectable, so they can be treated like everybody else.

1 solution

There is no 'jQuery function' here!
In fact jQuery removed its browser detection member with version 1.9 and the reason is that user agent string is become a not reliable source of information...
The best way to decide if you can do something in JavaScript or not, is feature detection...
http://msdn.microsoft.com/en-us/magazine/hh475813.aspx[^]
 
Share this answer
 
Comments
Anubhav Goel 11-Nov-14 7:56am    
hii...i need to fix the issue in the same code itself ..don't have any reliable option to use javascript

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900