-
November 18th, 2009, 09:46 AM
#1
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
-
November 18th, 2009, 11:21 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|