Detect browser version in javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy

    Detect browser version in javascript

    Hi,

    I'm trying to use javascript to detect the version of internet explorer
    before running an active x control. I'm after the full version number
    (eg not just IE6 but 6.0.2800.1106). Is there any way of getting this
    using javascript?

    If not, can anybody suggest how i could go about getting it?

    many thanks in advance,

    andy

  • Ian  Leow

    #2
    Re: Detect browser version in javascript

    As far as I know, no. Since what you are looking for is an IE browser,
    you might want to use JScript or VBScript if they are capable of
    detecting the browser's minor version (note that other browsers, such
    as FireFox and Netscape, will ignore JScript and VBScript scripts).

    Comment

    • Michael Winter

      #3
      Re: Detect browser version in javascript

      On 31/05/2005 11:47, Ian Leow wrote:
      [color=blue]
      > (note that other browsers, such as FireFox and Netscape, will ignore
      > JScript and VBScript scripts).[/color]

      When properly identified, a user agent should ignore a language it
      doesn't understand. However, JScript is merely another implementation of
      ECMAScript, like Mozilla's JavaScript, and many other implementations .

      Other user agents may ignore Microsoft-specific extensions like
      conditional comments, but not the basic language itself.

      Mike

      --
      Michael Winter
      Replace ".invalid" with ".uk" to reply by e-mail.

      Comment

      • Randy Webb

        #4
        Re: Detect browser version in javascript

        Andy wrote:
        [color=blue]
        > Hi,
        >
        > I'm trying to use javascript to detect the version of internet explorer
        > before running an active x control. I'm after the full version number
        > (eg not just IE6 but 6.0.2800.1106). Is there any way of getting this
        > using javascript?[/color]

        No.
        [color=blue]
        > If not, can anybody suggest how i could go about getting it?[/color]

        var IEVerNumber = prompt('What revision IE do you have?','Click
        Help>About Internet Explorer and it will show it to you')

        Meaning, you ask the user. Or, you have the ActiveX Control determine
        whether it can execute what it wants to or not.

        What exactly are you trying to do?

        --
        Randy
        comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

        Comment

        • Randy Webb

          #5
          Re: Detect browser version in javascript

          Ian Leow wrote:
          [color=blue]
          > As far as I know, no. Since what you are looking for is an IE browser,
          > you might want to use JScript or VBScript if they are capable of
          > detecting the browser's minor version.[/color]

          JScript and Javascript, in IE, are synonymous.

          for (i in navigator){
          document.write( i + ' = ' + navigator[i] + '<br>');
          }

          Will show you the information that is available from the navigator
          object and the Revision Number is not one of them.

          --
          Randy
          comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: Detect browser version in javascript

            Andy wrote:
            [color=blue]
            > I'm trying to use javascript to detect the version of internet explorer
            > before running an active x control. I'm after the full version number
            > (eg not just IE6 but 6.0.2800.1106). Is there any way of getting this
            > using javascript?[/color]

            No. The HTTP-User-Agent header and so the `userAgent' property of the
            object referred to by the global proprietary `navigator' property can
            be forged.
            [color=blue]
            > If not, can anybody suggest how i could go about getting it?[/color]

            Since it more depends on the ActiveX version installed instead of the UA
            version (note that Netscape 4+ supports ActiveX as well), it would be more
            reasonable to cure the illness instead of the symptoms. Why not check for
            the ActiveX support and version and handle missing support accordingly?


            PointedEars

            Comment

            Working...