Is IE? Shortest JavaScript code to find whether the browser is Internet Explorer.

There are a lot of JavaScript codes to find whether the user browser is Internet Explorer. But here is the shortest code to check whether the browser is Internet Explorer.

if(‘\v’==’v')

It will return true if you are using Internet Explorer.

So we can write the code like this.


Tags: , , ,

4 Responses to “Is IE? Shortest JavaScript code to find whether the browser is Internet Explorer.”

  1. Remiz Says:
    January 31st, 2009 at 3:25 am

    Wow thats cool
    So it is easy to fix all our css bugs.

    if(“\v”==”v”){
    window.location = “http://www.getfirefox.com/”;
    }

    I will add this to my SEO Blog.

  2. mattiz Says:
    February 5th, 2009 at 11:48 am

    Hey Sunil,
    Great to have you blogging. Keep on. I shall be a regular visitor. Did you design the layout, by the way?
    Great going!!
    Cheers

  3. Mathew Pappady Says:
    February 15th, 2009 at 7:36 am

    Hi Sunil,

    Really cool one.. Keep on blogging. :)

  4. salman Says:
    July 12th, 2011 at 3:40 pm

    is.ie

    is more readable though :)

Leave a Reply

You must be logged in to post a comment.