Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

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

    Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

    I'm looking for a script that will check a visitors browser.

    Now, I only want visitors using Microsoft InterNet Explorer to visit
    existing URL and all other browsers will be redirected to another part
    of my site.

    I've checked a bunch of scripts but you have to identify every darn
    browser available. All I want to do is check for any version of
    Microsoft InterNet Explorer and redirect all other browsers to another
    URL.

    Any help would be greatly appreciated.

    Thanks!
  • Ivo

    #2
    Re: Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

    "Informatio n" <vpnavy@yahoo.c om> wrote[color=blue]
    > I'm looking for a script that will check a visitors browser.
    >
    > Now, I only want visitors using Microsoft InterNet Explorer to visit
    > existing URL and all other browsers will be redirected to another part
    > of my site.
    >
    > I've checked a bunch of scripts but you have to identify every darn
    > browser available. All I want to do is check for any version of
    > Microsoft InterNet Explorer and redirect all other browsers to another
    > URL.[/color]

    Not true. Think the other way around, and redirect all IE browsers to a
    dedicated page with a conditional comment, which is something that only IE
    understands and is incidentally more politically correct:

    <!--[if IE]>
    <meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
    <![endif]-->

    All other browsers will treat this whole block as a HTML comment and ignore
    it.
    It goes without saying that it is always best to stay away from browser
    sniffing scripts in general and those that read the user agent string in
    particular as they are not reliable enough, and on the www one should really
    not design for a specific browser to begin with.

    HTH
    --
    Ivo



    Comment

    • Mick White

      #3
      Re: Only Allow Microsoft IE Browser To View Site - All Other BrowsersAre Redirected

      Ivo wrote:

      [snip][color=blue]
      >
      > <!--[if IE]>
      > <meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
      > <![endif]-->
      >
      > All other browsers will treat this whole block as a HTML comment and ignore
      > it.[/color]

      Not applicable to IE Mac....
      Mick

      Comment

      • Information

        #4
        Re: Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

        "Ivo" <no@thank.you > wrote in message news:<41ab6022$ 0$69632$1b2cd16 7@news.wanadoo. nl>...
        SNIP[color=blue]
        >
        > <!--[if IE]>
        > <meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
        > <![endif]-->
        >
        > All other browsers will treat this whole block as a HTML comment and ignore
        > it.[/color]
        SNIP

        Works like a champ! Thanks for your help.

        Comment

        • RobG

          #5
          Re: Only Allow Microsoft IE Browser To View Site - All Other BrowsersAre Redirected

          Information wrote:[color=blue]
          > "Ivo" <no@thank.you > wrote in message news:<41ab6022$ 0$69632$1b2cd16 7@news.wanadoo. nl>...
          > SNIP
          >[color=green]
          >><!--[if IE]>
          >><meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
          >><![endif]-->
          >>
          >>All other browsers will treat this whole block as a HTML comment and ignore
          >>it.[/color]
          >
          > SNIP
          >
          > Works like a champ! Thanks for your help.[/color]

          I presume that if the user has disabled "refresh" then it won't. And
          given the annoyance caused by pages that refresh themselves, the number
          of users with it disabled will grow.

          You have no way of detecting it unless they take the time to e-mail you
          and complain.

          --
          Rob

          Comment

          • Information

            #6
            Re: Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

            RobG <rgqld@iinet.ne t.auau> wrote in message news:<3HQqd.903 $I52.39264@news .optus.net.au>. ..[color=blue]
            > Information wrote:[color=green]
            > > "Ivo" <no@thank.you > wrote in message news:<41ab6022$ 0$69632$1b2cd16 7@news.wanadoo. nl>...
            > > SNIP
            > >[color=darkred]
            > >><!--[if IE]>
            > >><meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
            > >><![endif]-->
            > >>
            > >>All other browsers will treat this whole block as a HTML comment and ignore
            > >>it.[/color]
            > >
            > > SNIP
            > >
            > > Works like a champ! Thanks for your help.[/color]
            >
            > I presume that if the user has disabled "refresh" then it won't. And
            > given the annoyance caused by pages that refresh themselves, the number
            > of users with it disabled will grow.
            >
            > You have no way of detecting it unless they take the time to e-mail you
            > and complain.[/color]

            Well, we can only do our best to make our visitors comfortable. It is
            very very unfortunate that different browsers handle html and java
            differently.

            Thanks!

            Comment

            • Andrew Thompson

              #7
              Re: Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

              On 30 Nov 2004 03:24:24 -0800, Information wrote:
              [color=blue]
              > Well, we can only do our best to make our visitors comfortable.[/color]

              Admirable.
              [color=blue]
              >..It is
              > very very unfortunate that different browsers handle html and java
              > differently.[/color]

              Yes it is, but that is the way it is. However, they generally
              render valid mark-up in a logical way, certainly not the same
              as each other, but well enough for the visitor to access and use
              the content.

              OTOH, you can use CSS import hacks to ensure that the *formatting*
              is the same on a multitude of browsers. It's advantages are that
              it works even if..
              1) Client side script is disabled.
              2) META-REFRESH redirect is disabled.

              Further, it requires no 'second page', and works according to the
              browser's parsing engine, rather than the browser type it claims to be.

              --
              Andrew Thompson
              http://www.PhySci.org/codes/ Web & IT Help
              http://www.PhySci.org/ Open-source software suite
              http://www.1point1C.org/ Science & Technology
              http://www.LensEscapes.com/ Images that escape the mundane

              Comment

              • Mark Preston

                #8
                Re: Only Allow Microsoft IE Browser To View Site - All Other BrowsersAre Redirected

                Ivo wrote:
                [color=blue]
                > "Informatio n" <vpnavy@yahoo.c om> wrote
                >[color=green]
                >>Now, I only want visitors using Microsoft InterNet Explorer to visit
                >>existing URL and all other browsers will be redirected to another part
                >>of my site.
                >>[/color][/color]
                Got to say that I can't think why you would want to do that at all. It
                makes things harder to maintain and seems to serve no useful purpose.
                I'm sure you must have your reasons and admit that I'm curious - but its
                none of my business.[color=blue]
                >
                > Not true. Think the other way around, and redirect all IE browsers [snip]
                >
                > <!--[if IE]>
                > <meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
                > <![endif]-->
                >[/color]
                Splendid tip - for the unimaginable case that you might need it.

                Comment

                • Information

                  #9
                  Re: Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

                  Mark Preston <usenet@nosourc e.co.uk> wrote in message news:<coi0kr$64 u$1$8300dec7@ne ws.demon.co.uk> ...[color=blue]
                  > Ivo wrote:
                  >[color=green]
                  > > "Informatio n" <vpnavy@yahoo.c om> wrote
                  > >[color=darkred]
                  > >>Now, I only want visitors using Microsoft InterNet Explorer to visit
                  > >>existing URL and all other browsers will be redirected to another part
                  > >>of my site.
                  > >>[/color][/color]
                  > Got to say that I can't think why you would want to do that at all. It
                  > makes things harder to maintain and seems to serve no useful purpose.
                  > I'm sure you must have your reasons and admit that I'm curious - but its
                  > none of my business.[color=green]
                  > >[/color][/color]
                  SNIP

                  Well, my son's website developer moved away and my son asked me to
                  pick up his site for now (my son owns a Comic Book store). The site
                  is stock full of java with all kind of neat stuff taking place on all
                  the pages. I was "fat and happy" with the updates and decided to take
                  a look at the site using NetScape 7x, Opera, Mozilla FireFox, Mozilla
                  Navigator, and NetScape 4x. Geeeez, everything looked perfect with IE
                  but was a total mess with most of the other browsers. I started to
                  play with the files and came close with all my test browsers but not
                  close enough for me! I decided that I would rather limit the viewing
                  for now (with an explanation to visitors using other browsers) while
                  redesigning the site so it is compatible with all browsers.

                  Hope I wasn't long winded on my explanation.

                  Comment

                  Working...