Cookies are data, stored in small text files , on your computer. Web Browsers and Servers use HTTP protocol to communicate and HTTP is a stateless protocol . When a web server has sent a web page to a browser, the connection is shut down, and the server forgets everything about the user. But for a commercial website, it is required to maintain session information among different pages. In order for it to remember users information, cookies are used.
Cookies are stored in the computer in name-value pairs.
Add an expiry date (in UTC time)
With a path parameter, you can tell the browser what path the cookie belongs to. By default, the cookie belongs to the current page.
Read a Cookie
Change a Cookie
Delete a Cookie