标签:keyword javascrip pager number word false ace java 时间
原文地址:http://www.cnblogs.com/wupeiqi/articles/5246483.html
感谢说话声音像评书表演艺术家刘兰芳老师的武沛齐老师的倾力奉献!
1、获取Cookie:
request.COOKIES[
‘key‘
]
request.get_signed_cookie(key, default
=
RAISE_ERROR, salt
=
‘‘, max_age
=
None
)
参数:
default: 默认值
salt: 加密盐
max_age: 后台控制过期时间
rep
=
HttpResponse(...) 或 rep = render(request, ...)
rep.set_cookie(key,value,...)
rep.set_signed_cookie(key,value,salt
=
‘加密盐‘
,...)
参数:
key, 键
value
=
‘‘, 值
max_age
=
None
, 超时时间
expires
=
None
, 超时时间(IE requires expires, so
set
it
if
hasn‘t been already.)
path
=
‘/‘
, Cookie生效的路径,
/
表示根路径,特殊的:跟路径的cookie可以被任何url的页面访问
domain
=
None
, Cookie生效的域名
secure
=
False
, https传输
httponly
=
False
只能http协议传输,无法被JavaScript获取(不是绝对,底层抓包可以获取到也可以被覆盖)
<script src
=
‘/static/js/jquery.cookie.js‘
><
/
script>
$.cookie(
"list_pager_num"
,
30
,{ path:
‘/‘
});
标签:keyword javascrip pager number word false ace java 时间
原文地址:https://www.cnblogs.com/saintdingspage/p/8974712.html