jQuery cookie control -


To create cookies, which will work on all pages on the site ?

The code must be added to "movie_check" with "none" value, which can be used on all pages of the site "www.site.com" (the script was implemented). Ends after 365 days.

Try it (does not work):

  $ Cookie ("movie_check", "no", {expires: 365, domain: 'www .site.com'});  

Thanks.

Try:

  var date = new date (); Date.SsetTime (date.getTime () + (3 * 24 * 60 * 60 * 1000)); $ .cookie ('movie_check', 'no', {path: '/', expiry: date});  

Your code sets an expiration date in the past.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -