开发者

Cookie not being set on IE, but sets fine on chrome and firefox

I'm calling this code on IE8, and on fire开发者_运维技巧fox:

document.cookie = 'val=500; expires=Wed, 18 Aug 2010 09:06:21 GMT; path=/dir/257/the-quick-brown-fox'

It works fine on firefox and chrome, but not on IE. Anyone see whats wrong?

UPDATE: if I don't put the path then it works in both browsers, but I'd like to be able to put the path:

document.cookie = 'val=500; expires=Wed, 18 Aug 2010 09:06:21 GMT'


The first thing to check would be the security settings on IE. Maybe it's set (or defaulted) to not accept cookies.

Maybe an obvious thing, but somehow when you get deep into bug fixing the obvious things have a tendency to bite you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜