detect browser version

Results 1 to 2 of 2

Thread: detect browser version

  1. #1
    Join Date
    Dec 1969

    Default detect browser version

    How do I code it so that <BR><BR>any version of IE below 5.5 and NS below 6 <BR><BR>would be redirected to the Microsoft or NS sites?

  2. #2
    Join Date
    Dec 1969

    Default javascript

    var expTestVersion = /[sw(;.]*MSIEs(d*.?d*)[sw);.]*/gi; <BR>var getBrowserVersion = navigator.appVersion; <BR>var reportBrowserVersion = getBrowserVersion.replace(expTestVersion, "$1");<BR>if (navigator.appName == &#039;Netscape&#039; &#124&#124 reportBrowserVersion &#060; &#039;5.5&#039;) {<BR> alert("Sorry, you must have Internet Explorer 5.5 or later in order to view this page.");<BR> location.href = &#039;main.asp&#039;;<BR>}<BR>I&#039;m sure you can monkey with the code to make it suite your needs...<BR>~~Chaotix

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts