[IE7 Beta2] Check browser with JavaScript

Discussion in 'Internet Explorer' started by Nono's, Feb 2, 2006.

  1. Nono's

    Nono's Guest


    For some compatibility reasons, I check the browser version with this script:

    <script type="text/javascript">
    //Detect IE
    if (navigator.appVersion.indexOf("MSIE") != -1) {

    With IE7 the default security policy for Javascript don't execute this part
    of code and so... my page is not redirected!

    How can I make sure that this page is well redirected?
    Is there another solutions without JavaScript?

    Many thanks

    Nono's, Feb 2, 2006
    1. Advertisements

  2. Nono's,

    Check to see what IE7 is returning. Try this:

    var myBrowser = navigator.appName;


    var myBrowser = navigator.appVersion;

    And see what it is returning.
    Traxion Design, Feb 17, 2006
    1. Advertisements

  3. The default security policy for JScript didn't change for IE7. What makes
    you think that this code isn't being executed?
    Eric Lawrence [MSFT], Feb 17, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.