How to create cookie, which will work on all pages over choosen site?
Using cookie plugin.
Code must add cookie "movie_check" with value "no", which can be used over all pages on site "www.site.c开发者_开发技巧om" (were script is implemented). Expires after 365 days.
Tryed this (doesnt work):
$.cookie("movie_check", "no", {expires: 365, domain: 'www.site.com'});
Thanks.
Try:
 var date = new Date();
 date.setTime(date.getTime() + (3 * 24 * 60 * 60 * 1000));
$.cookie('movie_check', 'no', { path: '/', expires: date });
Your code sets an expiration date in the past.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论