Skip to content Skip to sidebar Skip to footer

Document.cookie Not Working In Ie

This example working fine in firefox, opera and chrome but not working/cookie not save in IE. function setCookie(name,value,exdays) { var exdate=new Date(); exd

Solution 1:

IE has encoding issues unlike all other browsers, some languages are not encode automatically and are %3F encoded instead.

"%3F" = "?" Sign.

You need to look into your cookie while on IE and check the contents, check whether the file is properly encoded. If not, use it like this:

document.cookie=name + "=" + (encodeUriComponent)value;

Post a Comment for "Document.cookie Not Working In Ie"