简体   繁体   English

在页面加载期间使用 firecookie 捕获 cookies

[英]Catching cookies with firecookie during page load

I need to see what script sets a specific cookie when I load a page.当我加载页面时,我需要查看哪个脚本设置了特定的 cookie。 Firecookie seems to work well when the cookie is set after the page loads but is completely useless if the cookie is set before the page loads.当 cookie 在页面加载后设置时,Firecookie 似乎运行良好,但如果 cookie 在页面加载之前设置,则完全没用。

The page I'm debugging doesn't belong to me so I'm kind of limited to doing this in-browser.我正在调试的页面不属于我,所以我仅限于在浏览器中执行此操作。 I really don't want to download all the scripts on the page and dissect them line by line.我真的不想下载页面上的所有脚本并逐行剖析它们。 Is there any way to get Firecookie to break on a script during page load?有什么方法可以让 Firecookie 在页面加载期间中断脚本?

Is there any way to get Firecookie to break on a script during page load?有什么方法可以让 Firecookie 在页面加载期间中断脚本? If the cookie is set by a Javascript on the page (accessing the document.cookie field) - and so, there is a callstack and line number to show to the user, then Firebug should break (no matter whether it happens during the page load phase or later).如果 cookie 是由页面上的 Javascript 设置的(访问 document.cookie 字段) - 因此,有一个调用堆栈和行号要显示给用户,那么 Firebug 应该会中断(无论它是否在页面加载期间发生阶段或更晚)。

If the cookie is set by the server (cookie is specified in a HTTP header), Firebug can't break (there is no JS script to break on), but you should be able to see a log in the Console panel.如果 cookie 是由服务器设置的(cookie 在 HTTP 标头中指定),Firebug 无法中断(没有 JS 脚本可以中断),但您应该能够在控制台面板中看到日志。

Honza洪萨

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM