title: How to find out where a cookie is set?
body: <p>I am trying to find out where a cookie is being set.</p>
  
  <p>I am running Varnish cache and want to know where the cookie is being set so I know if I can safely remove it for caching purposes.</p>
  
  <p>The response headers look like this;</p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: Apache/2.2.17 (Ubuntu)
  Expires: Mon, 05 Dec 2011 15:11:39 GMT
  Cache-Control: no-store, max-age=7200
  Vary: Accept-Encoding
  Content-Type: text/html; charset=UTF-8
  X-Session: NO
  X-Cacheable: YES
  Date: Tue, 04 Dec 2012 15:29:40 GMT
  X-Varnish: 1233768756 1233766580
  Age: 1081
  Via: 1.1 varnish
  Connection: keep-alive
  X-Cache: HIT
  </code></pre>
  
  <p>There is no cookie present. But when loading the same page in a browser the headers are the same, I get a cache hit and no cookie in the response headers.</p>
  
  <p>But then the cookie is there all of a sudden, so it must be being somewhere. Even if I remove it it reappears. It even appears in Incognito mode in Chrome. But it is not in the header response.</p>
  
  <p>I have been through all the javascript on the site and cannot find anything, is there any other way of setting a cookie?</p>
  
  <p>Thanks.</p>