我在firefox中添加了一个使用firebug的cookie键值paire。
myid:12345然后像这样从服务器上得到饼干:
var ccnid = CookieUtil.GetValue("myid");
Response.Write("myid:"+myid);
Response.End();我的网站网址是:http://192.168.1.222:8889/。
当像这样设置cookie域时:http://192.168.1.222。我浏览url:http://192.168.1.222:8889,响应http://192.168.1.222:8889
当像这样设置cookie域时:http://192.168.1.222:8889。我浏览url:http://192.168.1.222:8889,响应是:myid:。
为什么会发生这种情况?域:http://192.168.1.222:8889无法访问http://192.168.1.222:8889
发布于 2016-01-18 07:31:20
只需像这样删除端口:http://192.168.1.222,这样浏览器就可以读取它,cookie与域名有关系,而不是ip+port。
https://stackoverflow.com/questions/34462153
复制相似问题