What are the options in a cookie in JavaScript?

Posted by Andre Scott | Updated on

What are the options in a cookie in JavaScript?

There are few below options available for a cookie,

1. By default, the cookie is deleted when the browser is closed but you can change this behavior by setting expiry date (in UTC time).

2. By default, the cookie belongs to a current page. But you can tell the browser what path the cookie belongs to using a path parameter.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers