Coldfusion cookie问题
我在使用 cfcookie 标签删除客户端 cookie 时遇到问题,我将值设置为“”并将到期日期更改为现在。
但我认为它在删除 cookie 的同一页面中重置 cookie。
是否有一个应用程序(或 chrome、firefox 的插件)可以告诉我它在哪里给我 cookie?
I'm having issues deleting client cookies with the cfcookie tag, I'm setting the value to "" AND changing the expiration date to now.
But I think it's resetting the cookie in the same page that it deletes it.
Is there a application (or addon for chrome,firefox) that can tell me where it's giving me cookies?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Fiddler 是一款记录计算机和互联网之间所有 HTTP(S) 流量的应用程序。
1)运行Fiddler。
2) 在您使用的浏览器上打开您的网站。
3)查看Fiddler上的请求和响应头。任何 cookie 设置或删除都会在那里。
其他参考:
Fiddler 可以让调试变得简单。 [2006 年 9 月 12 日]
Fiddler 代理和 HTTP 调试工具 [2010 年 12 月 17 日]
There's Fiddler, an application that logs all HTTP(S) traffic between your computer and the Internet.
1) Run Fiddler.
2) Open your site on the browser you use.
3) Look at the request and response headers on Fiddler. Any cookie set or delete will be there.
Other references:
Fiddler Can Make Debugging Easy. [September 12, 2006]
Fiddler Proxy and HTTP Debugging Tool [December 17, 2010]
正如 tiangoinu 所说,在 Windows 上使用 Fiddler,或者如果您使用的是 Mac,请查看 Charles Proxy。
至于您的具体问题,请确认您在删除 cookie 后没有进行重定向。为了在客户端上删除 cookie,需要将必要的 HTTP 标头传递到浏览器,有时 cflocation 会阻止发送这些标头。
As tiangoinu said, use Fiddler for Windows, or if you're on a mac, check out Charles Proxy.
As to your specific question, verify that you're not doing a redirect after you delete the cookie. In order for the cookie to be deleted on the client, the necessary HTTP headers need to be passed to the browser, and sometimes a cflocation will prevent those headers from being sent.
是的,请查看 FireFox 的 HTTPLive 标头。或者在浏览器和服务器之间放置其他类型的拦截代理。然后,您可以查看 HTTP 标头并尝试确定 Cookie 的设置位置(或至少设置频率)。
Yes, look at HTTPLive Headers for FireFox. Or some other type of intercept proxy to put between the browser and the server. You can then see the HTTP headers and try to determine where the cookies are being set (or at least how often).