Does every web request send the browser cookies?

mrblah picture mrblah · Aug 26, 2009 · Viewed 81.3k times · Source

Does every web request send the browser's cookies?

I'm not talking page views, but a request for an image, .js file, etc.

Update If a web page has 50 elements, that is 50 requests. Why would it send the SAME cookie(s) for each request, doesn't it cache or know it already has it?

Answer

Ian Clelland picture Ian Clelland · Aug 26, 2009

Yes, as long as the URL requested is within the same domain and path defined in the cookie (and all of the other restrictions -- secure, httponly, not expired, etc) hold, then the cookie will be sent for every request.