Here is one that throws me for a loop. I am trying to set a simple cookie that has one name: a pair of values ββin IE8. Tested on FF and it works great. IE8 blocks it.
I read about the P3P materials and created a basic P3P document, no errors reported by the IBM tool, and added the following on all pages:
<meta http-equiv="P3P" CP="CAO DSP COR PSDa CONi TELi OUR STP COM NAV"><link rel="P3Pv1" href="/w3c/p3p.xml"></link>
The code I use to set the cookie is as follows:
function setCompatibilityCookie(c_name, value, expiredays) { var exdate = new Date(); exdate.setDate(exdate.getDate() + expiredays); document.cookie= c_name + "=" + escape(value) + ((expiredays==null) ? "" : ";expires=" + exdate.toUTCString());}
Any ideas why IE8 is blocking me from setting this cookie?
Thanks Schalk
javascript cookies internet-explorer-8 blocking
schalkneethling
source share