1

Just a quick question, is there any way to know what cookies a website is requesting when you visit it?

For example if I visit www.some-membership-site.com and it's looking for a "isLoggedIn" cookie, any way to get the name of the cookie (in this case "isLoggedIn).

Thanks!

Brad
  • 146,404
  • 44
  • 300
  • 476
Ryan
  • 8,933
  • 19
  • 57
  • 97
  • 2
    Use your browser's settings panel to find the cookies list and search by domain name. – Michael Berkowski Nov 12 '12 at 21:30
  • 1
    Beyond that, it is your browser that _sends_ the cookie no matter if it is actually needed by the requested script. Only the server-side script could determine if it is actually to be used. – Michael Berkowski Nov 12 '12 at 21:31
  • This will be closed as 'not a programming question'. Your browser has this functionality, for chrome there is also a nice plugin called 'Edit this Cookie'. – markus Nov 12 '12 at 21:31
  • Ah, that clears up some confusion, thanks guys! – Ryan Nov 12 '12 at 21:34

2 Answers2

1

The way it works is not having the site "requesting" the cookie, but the browser automatically returns the cookie that have been set previously by that website

thedayofcondor
  • 3,737
  • 1
  • 17
  • 27
  • Cool, will look into "curl-ing" my cookies ;) – Ryan Nov 12 '12 at 21:35
  • Connecting to the page and seeing what cookies it is trying to set it is only a partial solution - typically session cookies are set only after you login for example. – thedayofcondor Nov 12 '12 at 21:36
  • I downloaded and am trying to use firebug, using it I can see a bunch of cookies that the site has set, some say "session" some say "http only", is there any easy way to send these and which do I pick? – Ryan Nov 12 '12 at 21:39
  • the biggest difference is the expiration - see: http://www.allaboutcookies.org/cookies/cookies-the-same.html – thedayofcondor Nov 12 '12 at 21:41
1

Technically no, because the "looking for cookie" part is done server-side. Cookies are sent with the request, regardless of whether the server wants them or not.

However, if you look at that request data with browser tools, or some other tool, you will see what cookies are being used, and can get a good idea from there as to what is needed.

Brad
  • 146,404
  • 44
  • 300
  • 476