One popup every 24 hours?

Discussion in 'JavaScript' started by Gatorade, Jan 17, 2008.

  1. #1
    How would I make a popup only show up once for a visitor within a 24 hour period?
     
    Gatorade, Jan 17, 2008 IP
  2. rkquest

    rkquest Well-Known Member

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    140
    #2
    I think cookies can do it. You can either..

    a. Store the date and time of visit in the cookie.. if the current visit time is 24 hours or more from the time stored in the cookie, open the pop-up window and increment the value stored in the cookie..

    b. Or make the cookie expire after 24 hours.
     
    rkquest, Jan 17, 2008 IP