开发者

How can I watch cookies on a website to see how they're set?

First, should this be on anther StackExchange site?

I'm trying to scrape a site and it appears to set a cookie in Javascript: when looking at the HTTP requests all of a sudden the cookie appears as a request cookie without a preceding response command开发者_C百科 to set it. Is there any way in any major browser (ideally on OS X but I can boot into Windows or Linux) to watch a site's cookies and pause loading or execution of a page when there's a change and highlight the Javascript code or HTTP response that is responsible?


Cookies are not asked for, they are given, therefore you wont see it being requested.

They will come down in the headers and there is no way to determine, what, who or where they came from (apart from knowing they came from the site you are browsing or possibly sites it is linked to).


Open up Webkit Inspector and look at the network/resources tabs. Filter by "documents". Go through each documents' response headers and see if there is a cookie set. If not, then it must be JavaScript in which case you can do a search for "document.cookie".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜