昨天4ngel说在FD经常登陆不到,经查明,4ngel的cookie没有内容,也就是没有set到cookie....
cookie清空后证明不是因为cookie满而造成的,而FD对cookie的限制只有path为'/bbs/'
这个设置我是从VBB中知道这样用的,在使用中也没发现过
因为之前没有听到过这样的事情
为了确认是path的问题我把path修改为'/',这时候果然正常了.
这问题我昨天在网上查了很久没查出比较好的结果,我在网上找到的
Netscape cookie 规范中的path部分发现是这样规范的
复制内容到剪贴板
代码:
path=PATH
The path attribute is used to specify the subset of URLs in a domain for which the cookie is valid. If a cookie has already passed domain matching, then the pathname component of the URL is compared with the path attribute, and if there is a match, the cookie is considered valid and is sent along with the URL request. The path "/foo" would match "/foobar" and "/foo/bar.html". The path "/" is the most general path.
If the path is not specified, it as assumed to be the same path as the document being described by the header which contains the cookie. 在这个规范中,我没有看到定义目录的,只有一个广泛的定义:如果path是"/foo",那么对"/foobar"和"/foo/bar.html"有效.
比较奇怪,没有说到指定一个目录,比如只在bbs目录,于是我就做了一系列的实验.
IE中,
path为"/foo" foo目录内有效, fool目录内有效
path为"/foo/" foo目录内有效, fool目录内
无效
maxthon中
path为"/foo" foo目录内有效, fool目录内有效
path为"/foo/" foo目录内有效, fool目录内
无效
firefox中
path为"/foo" foo目录内有效, fool目录内
无效
path为"/foo/" foo目录内有效, fool目录内
无效
看起来虽然规范没有说能使用"/foo/"但大部分浏览器已经支持了,问了4ngel后,得知他使用的是maxthon,理应有效才对,做实验做到2点半,还没有一个比较令人满意的结果,"/foo/"这种格式应当在比较常见的几种浏览器都是有效的.但是既然有人反应无效,就说明还是有问题的,然后我把"/bbs/"修改为"/bbs",再叫4ngel帮忙测试一下,果然可以了.由于时间问题没有问到4ngel他使用的是什么版本的IE,在这里跟大家说一下了,既然设置成"/foo/"这种格式对比较特殊的浏览器无效,那就使用"/foo"吧,毕竟规范中没有定义过如何设置为指定目录,经过实验,这种方法还是有效的.恩,解决了就好,接下来我将FD设置为这种格式,看起来一切顺利了.
对于今天无法登陆或发帖的朋友这里给出解决的方法:
因为修改了作用域,所以大家需要将cookie清空,或者在cookie目录下将freediscuz.net的cookie清掉才可解决,为了避免而已清空其他会员的cookie,不提供清除cookie工具,请在浏览器清空,在此向大家道歉了....