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
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.