Detect IE browser | Javascript

While working with Web projects those required cross browser compatibility we often need to detect the browser type,like ie, Firefox Mozilla, or chrome...etc.

In this post we will see how to find ie browser. This is done using navigator object in JavaScript. Navigator has appName property that we can use to find ie browser.

JavaScript to detect ie

<html xmlns="">
<head runat="server">
<script type="text/javascript">
    function getBrowserName()
        if(navigator.appName=="Microsoft Internet Explorer") {
            alert("This is " + navigator.appName + " Browser");
    <form id="form1" runat="server">
    <input type="button" onclick="return getBrowserName();" value="Get Browser Name"/>

//Above code will show alert message "This is Microsoft Internet Explorer Browser"

Here we will see how to detect IE browser using jQuery


Post a Comment