Redirect based on page counter

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

    Redirect based on page counter

    I am looking for a simple JavaScript program that would redirect users
    to one of two web pages based on the web page counter. For example,
    when the counter is odd, the user would be redirected to page_1 and when
    the counter is even, they would be redirected to page_2. I have
    searched the web but have been unable to find this type of script. I am
    sure it would be very simple, but I do not know how to do it. Any help
    would be appreciated. Feel free to reply to this, or to email me.
    Thanks in advance for your help.
    -Andrew
    andrew_9@hotmai l.com
  • Randy Webb

    #2
    Re: Redirect based on page counter

    Andrew wrote:[color=blue]
    > I am looking for a simple JavaScript program that would redirect users
    > to one of two web pages based on the web page counter. For example,
    > when the counter is odd, the user would be redirected to page_1 and when
    > the counter is even, they would be redirected to page_2. I have
    > searched the web but have been unable to find this type of script. I am
    > sure it would be very simple, but I do not know how to do it. Any help
    > would be appreciated. Feel free to reply to this, or to email me.
    > Thanks in advance for your help.[/color]

    Do it on the server. Every time the page is requested, increment the
    counter. Check the counter, return the appropriate page.


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

    Comment

    Working...