开发者

Writing a cookie when back pressed in javascript?

I would 开发者_StackOverflow社区like to write a cookie when I detect a back press in the browser. This is working correctly and writing the cookie when a back press is detected. Problem is that when my page I am going back to loads it does not always have that new cookie value in its $_COOKIE array. This is strange because sometimes it is there and sometimes not, I'm thinking this is a race condition. Any ideas on a fix?


In JavaScript, the cookie is accessed with document.cookie. $_COOKIE is a PHP thing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜