Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to view the creation source of a cookie in Chrome?

I have been using the Chrome dev console's Application tab to look through various cookies stored by some sites. But one key piece of information that seems to be missing is a log of what actually created the cookie (i.e. where it came from).

Is there some tool in Chrome that will show me where a cookie actually came from (eg: javascript filename + line of code, set-cookie response header, etc)?

like image 946
jros Avatar asked Oct 25 '25 17:10

jros


1 Answers

If it's set in a HTTP response header, you can search for Set-Cookie in the Network panel's search UI.

Searching for Set-Cookie in the Network panel

Press Command+F or Control+F to open that search box.

You can search across all text by pressing Command+Shift+F or Control+Shift+F and then typing document.cookie into the Search tab, which is at the bottom of the next screenshot. If you know the name of the cookie, it would probably be more straightforward to search for that, instead.

search tab

like image 101
Kayce Basques Avatar answered Oct 28 '25 04:10

Kayce Basques



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!