Domain and Path Attributes for Cookies in PHP

Q

What Are Domain and Path Attributes for Cookies in PHP?

✍: FYIcenter.com

A

Cookies can also be defined with two other attributes:

  • Domain - A cookie attribute that defines the domain name of Web servers where this cookie is valid. Web browsers holding this cookie should not sent it back to any Web server outside the specified domain. The default domain is the domain from which the cookie originally came from.
  • Path - A cookie attribute that defines the path name of Web server document path where this cookie is valid. Web browsers holding this cookie should not sent it back to the server when requesting any documents that are outside the specified path. The default path is the root path.

 

Understanding and Managing Cookies in PHP

⇒⇒PHP Tutorials

2016-11-03, 236👍, 0💬