Unable to set cookie on Internet Explorer via Javascript -
i have seen alot of questions regarding , alot of different answers, none of them can see either apply me or have tried , have failed.
so, have below code:
date.prototype.addmins = function(minutes) { this.settime(this.gettime() + minutes*60000); return this; } function readcookie(name) { var nameeq = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charat(0)==' ') c = c.substring(1,c.length); return c.substring(nameeq.length,c.length); if (c.indexof(nameeq) == 0) return c; } return null; } var timer_expiry = new date().addmins(1); var expiry = new date().setfullyear(2030); document.cookie = 'my_signup_clock='+timer_expiry+';expires='+expiry+';path=/;'; var asc = readcookie('my_signup_clock') if (asc) { alert("exists"); } else{ alert("does not"); }
i've tested on browsers , cookies set except internet explorer (including 11). below think rule out answers:
- my domain not less 2 characters
- my domain not have underscores in it
- my cookies should 'first-party' there no iframes being called on website
- my website not p3p set (but believe not requirement?)
- my ie browser default settings (i'm on mac view website via vms or browserstack) - answer 'change settings' won't accepted, need think of users.
- my website redirects http https (if helps)
if has ideas how troubleshoot great because unfortunately can't see how heck i'll able - must doing wrong.
many thanks
Comments
Post a Comment