I am trying to write an IE specific code which
if (agent.indexOf("MSIE") != -1)
{
alert('IE');
//IE specific
}
But when I tried alert(agent.indexOf("MSIE")); It printed -1. But I am able to get my current browser properly using agent.indexOf() in Firefox and Chrome successfully.
Can anyone help me out with writing browser specific code? I checked out previous questions based on Browser specific code but none helped. The issue is occurred in IE 11 version 11.0.24 and also 11.0.25. Thank you.