使用 .setMaxAge()设置(单位是秒) second>0 保存在硬盘上的时间second<0 默认保存在浏览器的内存中second=0 立即删除 转载于:https://www.cnblogs.com/zhaozhaozhang/p/5818327.html