A cookie is used to identify a user. A cookie is a little record that the server installs on the client’s Computer. Each time a similar PC asks for a page with a program, it will send the cookie as well. With PHP, you can both make and recover cookie value.
Some important points regarding Cookies:
- Cookies maintain the session id generated at the back end after verifying the user’s identity in encrypted form, and it must reside in the browser of the machine
- You can store only string values not object because you can’t access any object across the website or web apps
- Scope: – Multiple pages.
- By default, cookies are temporary and transitory cookie saves in the browser only.
- By default, cookies are URL particular means Gmail isn’t supported in Yahoo and the vice versa.
- Per site 20 cookies can be created in one website or web app
- The Initial size of the cookie is 50 bytes.
- The Maximum size of the cookie is 4096 bytes.