One time page display

Discussion in 'JavaScript' started by guruguy, Jun 23, 2007.

  1. #1
    I'm looking for a simple script that allows a page to be viewed only once from the users computer. I'm thinking something that drops a cookie, and doesn't load the page (alert box + redirect) if a cookie is already detected. As simple as it is I don't know javascript and I have tried making this using other resources but it doesn't work. Anyone know where I can find something like this.
     
    guruguy, Jun 23, 2007 IP
  2. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #2
    Put an infinite loop in case you catch user trying to reload.
     
    it career, Jun 23, 2007 IP
  3. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that's probably the worst solution :p
    an infinite loop may cause the browser to crash, and that's not exacty what the user wants ;)

    It's like you said: use a cookie. You will have to use a serversided language to get the ip of the user.
     
    UnrealEd, Jun 23, 2007 IP