I plan to use some music on my site, but before I make it autoplay for each visitor, I would like to have either an alert pop up immediately, asking if they would like the music to play, or a nice little tooltip of some sort to present a message stating that you can check whether or not you would like the music.
So, I know I can set a cookie via the cookie plugin but I was wondering if I could set the cookie's time to infinite, in other words, never to delete it, unless the end-user deletes all of their cookies, or the specific one for my site.
Is this not considered a valid use of cookies? If not, for a task like this, what should time do you suggest I set it to?
Something like 10 years is infinite enough for this ever-changing web realm ;)
$.cookie('the_cookie', 'the_value', { expires: 365 * 10 });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With