更新时间:2023-10-19 23:17:58
我发现问题似乎与浏览器配置有关。
我在这里潜水了:
>
你能确认我没有什么能做,但最多警告我的用户?
it seems I'm not able to set a cookie on IE9 and I don't understand the cause. My goal is to set a cookie which expires after a year, and I'm using the following code
$.cookie( name, value, { expires:days } )
where days is equal to 365. The cookie I've got is gone as soon as the session expired ( i.e. close and open the browser ) I've also tried with the following code but nothing changed
function setCookie( name, value, days ) {
var exdate=new Date();
exdate.setDate(exdate.getDate() + days);
var c_value = value + ( ( days==null ) ? "" : "; expires="+exdate.toUTCString() + "; path=/");
document.cookie=name + "=" + c_value;
}
Is there something IE9 doesn't like (e.g. some characters)? Please give me a hand with this stuff.
Best Regards MB
I found that the problem seems to be tied to the Browser configuration. I've got a dive here:
All works fine now.
Could you confirm that there is nothing I can do about it but warn my users at most?