Can javascript time stamp a page to lock out for 24 hours?

Discussion in 'JavaScript' started by joestmc, Apr 10, 2008.

  1. #1
    Can Javascript time-stamp a page so that if a user visits the page then exits, they would have to wait 24 hours before visiting the page a 2nd time?

    Ideally, the could recieve some sort of error message if they did attempt to visit the page a second time w/in a 24 hour lockout period.
     
    joestmc, Apr 10, 2008 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    With javascript you can save time-stamp in a cookie (client machine), but this method won't work always.
    For example the user can erase their own cookies, or even can change their machine time.
    So the better way is saving that info on server.
     
    ajsa52, Apr 10, 2008 IP
  3. joestmc

    joestmc Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe this makes a difference?

    The code/page will exist in an online course hosted on my company's intranet.
     
    joestmc, Apr 10, 2008 IP
  4. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Are different machines: Your company's intranet host is the SERVER MACHINE and the user machine is the CLIENT MACHINE.
     
    ajsa52, Apr 10, 2008 IP