存档

2011年9月 的存档

Consistency with and without www in URL

2011年9月3日 没有评论

Today I counted a persistence problem with cookies: I have one domain like example.com. But when I set the same cookie on http://example.com and http://www.example.com, the browsers will treat it as different ones.

So after searching, these two links

http://stackoverflow.com/questions/2345137/php-cookie-problem-www-or-without-www

http://stackoverflow.com/questions/3545228/setting-the-cookie-which-works-across-http-and-https-with-www-and-without-www

help me a lot, just a dot before domain when setting cookies will solve the problem.

分类: 前台设计 标签: , ,