jquery方法
$.cookie("userName", null);
$.cookie("passWord", null);
http://x.com/x.htm 清除成功
http://x.com/a/x.htm 清除失败js代码是没问题的,因为在根目录清除成功了,但不知道为什么在子目录下就无效
$.cookie("userName", null);
$.cookie("passWord", null);
http://x.com/x.htm 清除成功
http://x.com/a/x.htm 清除失败js代码是没问题的,因为在根目录清除成功了,但不知道为什么在子目录下就无效
http://topic.csdn.net/u/20100827/22/2335d1ad-a335-4c5a-8391-1736c998ea46.html
Possible ValuessCookie String that specifies or receives the name=value; pairs, plus any of the values listed in Possible Values.
expires=date;
Setting no expiration date on a cookie causes it to expire when the browser closes. If you set an expiration date in the future, the cookie is saved across browser sessions. If you set an expiration date in the past, the cookie is deleted. Use GMT format to specify the date.
domain=domainname;
Setting the domain of the cookie allows pages on a domain made up of more than one server to share cookie information. path=path;
Setting a path for the cookie allows the current document to share cookie information with other pages within the same domain—that is, if the path is set to /thispathname, all pages in /thispathname and all pages in subfolders of /thispathname can access the same cookie information.
secure;
Setting a cookie as secure; means the stored cookie information can be accessed only from a secure environment.