Reputation: 81
I would like to know with a possible detailed way how the "setcookie" domain parameter is handled. Let's take the following example:
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", "www.example.com", 1);
I'm wondering which scenario is taken place:
So i'm asking again on which side the decision is given? Server or client?
Upvotes: 1
Views: 168
Reputation: 202118
On client-side.
The setcookie
does not do anything smart. It just takes its arguments, formats and outputs the Set-Cookie
HTTP header (according to RFC 6265).
You can use any web browser developer tools to see HTTP headers (including cookie headers) in and out. It would help you understand, how it works.
Upvotes: 1