Web Analytics Made Easy -
StatCounter Separate redirect to Netscape 7 page - CodingForum

Announcement

Collapse
No announcement yet.

Separate redirect to Netscape 7 page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Separate redirect to Netscape 7 page

    Hello folks!
    I was wondering if it is possible to direct users to a page that I have optimized for Netscape 7? The current script that I am using directs all users to a page that is Netscape 6 optimized, even if they are using the Netscape 7 browser.
    In other words, If someone is using 7, can I have them go to a specific page that is different from someone who is using the 6 browser?

    Thanks you for your time and consideration!
    Kind regards,
    Greg


    Here's the code that I will be using:
    ----------------------------------------------------------------------------------

    <script>

    //Browser redirect Script- © Dynamic Drive (www.dynamicdrive.com)
    //For full source code, 100's more DHTML scripts, and Terms Of Use,
    //visit dynamicdrive.com

    var browser_type=navigator.appName
    var browser_version=parseInt(navigator.appVersion)

    //if NS 6
    if (browser_type=="Netscape"&&browser_version>=5)
    window.location.replace("http://mozilla.org")
    //if IE 4+
    else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
    window.location.replace("http://microsoft.com")
    //if NS4+
    else if (browser_type=="Netscape"&&browser_version>=4)
    window.location.replace("http://www.netscape.com")
    //Default goto page (NOT NS 4+ and NOT IE 4+)
    else
    window.location="http://www.dynamicdrive.com"
    </script>

  • #2
    Is there that much difference between Netscapes Version 6 and 7 browsers that you need to have an optimized page for each?

    Comment


    • #3
      <script>

      //Browser redirect Script- © Dynamic Drive (www.dynamicdrive.com)
      //For full source code, 100's more DHTML scripts, and Terms Of Use,
      //visit dynamicdrive.com

      var browser_type=navigator.appName
      var browser_version=parseInt(navigator.appVersion)

      //if NS 7
      if (browser_type=="Netscape"&&browser_version>=6)
      window.location.replace("http://mozilla.org")
      //if NS 6
      if (browser_type=="Netscape"&&browser_version>=5)
      window.location.replace("http://mozilla.org")
      //if IE 4+
      else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
      window.location.replace("http://microsoft.com")
      //if NS4+
      else if (browser_type=="Netscape"&&browser_version>=4)
      window.location.replace("http://www.netscape.com")
      //Default goto page (NOT NS 4+ and NOT IE 4+)
      else
      window.location="http://www.dynamicdrive.com"
      </script>

      Comment


      • #4
        Welcome to the forums.
        Yes...I was wondering about that, too. You're optimizing pages for 1% using NS?
        Whatever...I see someone's already replied.
        PS - That NS4 was a real stinker.
        Zoobie or not Zoobie...That is the problem.
        <body onUnload="flush( ! )">

        Comment


        • #5
          Garadon,
          Thank you for you post. I had tried what you suggested before my post, and I had no luck! For the sake of trying, I copied and pasted your script modification, but with the same results.

          The reason that I need to redirect is due to a z-index issue. I have a drop down menu that appears above a Flash file on my page. The menu categories appear behind the Flash file, even though I have the Flash with a transparent background. In Netscape 7.1, this is not a problem. In 6, the menu is obstructed by the Flash file. I was planning on having 2 different home pages. One would have the menu at the top of the page for NS 7.1 users (and IE-all flavors) and the second version would have the menu below (further down the page) the Flash file that would satisfy the NS 6 and below users.

          I may just end up having all users of Netscape and it's various flavors go to one page.

          Thank you for your input, I appreciate it!
          Greg

          Comment


          • #6
            what this show in ns7?
            alert(browser_type+'-'+browser_version);

            Comment


            • #7
              Zoobie,
              Thanks for the welcome!
              If it were up to me, I wouldn't worry about older browser versions, but I know that the folks here will want to make sure that the site "works" for as many folks as possible.
              Oh well!!!
              Take care,
              Greg

              Comment


              • #8
                Garadon,
                I'm not sure I follow you on that last post.
                If you get a chance, could you elaborate?
                I appreciate it!
                Thanks,
                Greg

                Comment


                • #9
                  just run the following code in ns7 and tell me what the alert says

                  var browser_type=navigator.appName
                  var browser_version=parseInt(navigator.appVersion)
                  alert(browser_type+'-'+browser_version);

                  Comment


                  • #10
                    Garadon,
                    Thanks for the clarification.

                    Here's the alert that I get:

                    Netscape-5

                    Based on that result, I assume that the broswer detection does not see a difference between version 6 & 7.

                    Am I correct in that assumption?
                    Thank you!
                    Greg

                    Comment


                    • #11
                      well the code you used don't(assuming your on Ns7 )

                      any way this link her
                      http://javascriptkit.com/javatutors/navigator.shtml
                      launch that and cut and paste the lines below the table.

                      MINE:
                      AppCodeName: Mozilla
                      AppName: Microsoft Internet Explorer
                      AppVersion: 4.0 (compatible; MSIE 6.0; Windows NT 5.0)
                      UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
                      Platform: Win32

                      Comment


                      • #12
                        Garadon,
                        Thank you for the information.
                        That does work, but it only gives me the Alert that I am using a 4.7+ browser.
                        However, it's not accomplishing what I am looking to achieve.
                        I'm going to proceed on the notion that I will make the Netscape 6 & 7 redirection go to one page and have the IE folks go to another.
                        Thank you for all the help!!!
                        Regards,
                        Greg

                        Comment

                        Working...
                        X