CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    4

    How to find time between visits to web page

    Hi everyone,

    I have a site that plays music each time the home page opens. I would like to modify it the way that the music will play only once per day for each visitor. That is, if a visitor navigates away from the home page and then comes back to it, the music should not play again. Is there a way to do that in JavaScript or using any other scripting language?

    Thank you

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: How to find time between visits to web page

    Make a cookie that lasts 24 hours. If the cookie exists, don't play the music. If it doesn't, create it, and play the music.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured