开发者

Google Chrome Cookie Issues [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

setcookie() does not set cookie in Google Chrome

I'm testing a site I've built using the latest build of Chrome on Windows 7 and for some reason it's having issues with cookies. From what I can tell the cookies are being set correctly by the php script but then fail som开发者_StackOverflowe basic validation in my script on the next page load and are then reset to the default setting.

What is baffling is when using Chrome with Windows XP there are no issues at all. Additionally there are no issues when using IE 8 on Windows 7 or the OSX build of Chrome, Firefox or Safari.

Anyone have any suggestions?


This is probably a long shot if you're using php's setcookie() function, but double check that your cookie/header isn't malformed. It's possible Chrome is less forgiving about a small error that the other browsers ignore.


I was having a problem with Chrome saving cookies using Jetty - worked on FF and IE, but not Chrome. The cookie was storing three pieces of info, and I discovered that the problem was with the delimiter character. I was using ';' as a delimiter (so the cookie was e.g. "alpha;beta;gamma") but only the first token ("alpha") was being stored.

I used a different delimiter and the problem went away.

I don't know if this is, as keithjgrant suggested, Chrome being more picky, or just broken, but I voted his answer up because it gave me the clue I needed :-)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜