diff --git a/reference/network/functions/setcookie.xml b/reference/network/functions/setcookie.xml index e0d33159f4..602c2f7666 100644 --- a/reference/network/functions/setcookie.xml +++ b/reference/network/functions/setcookie.xml @@ -48,8 +48,9 @@ instead. - See Netscape cookie specification for - specifics on how each setcookie parameter works + RFC 2109 provides the normative + reference on how each setcookie parameter is + interpreted. name @@ -63,9 +64,9 @@ value - The value of the cookie. This value is stored on the clients - computer; do not store sensitive information. - Assuming the name is 'cookiename', this + The value of the cookie. This value is stored on the clients computer; + do not store sensitive information. Assuming the + name is 'cookiename', this value is retrieved through $_COOKIE['cookiename'] @@ -118,14 +119,15 @@ domain - The domain that the cookie is available. - To make the cookie available on all subdomains of example.com - then you'd set it to '.example.com'. The - . is not required but makes it compatible - with more browsers. Setting it to www.example.com - will make the cookie only available in the www - subdomain. Refer to tail matching in the - spec for details. + The domain that the cookie is available to. To make the cookie + available on all subdomains of example.com (including example.com + itself) then you'd set it to '.example.com'. + Although some browsers will accept cookies without the initial + ., RFC 2109 + requires it to be included. Setting the domain to + 'www.example.com' or + '.www.example.com' will make the cookie only + available in the www subdomain. @@ -370,6 +372,7 @@ one : cookieone header setrawcookie cookies section + Original Netscape cookie specification RFC 2109 RFC 2965