function setCookie4(c_name,value,expiredays){
    var cookieStr = "";
    var exdate=new Date();
    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie = c_name+ "=" +escape(value)+
    ((expiredays==null) ? "" : "; expires="+exdate.toGMTString())+";path=/;Secure";
}

Javascript: js对secure的支持是没问题的,可是httponly本就是为限制js而产生的,当然httponly的cookie也不会被js创建
document.cookie = "username=" +escape("leon") + "; expires=15/02/2013 00:00:00; path=/;domain=www.example.com; secure";

相关文章:

  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
猜你喜欢
  • 2022-02-03
  • 2021-12-13
  • 2021-10-21
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
相关资源
相似解决方案