JavaScript Cookie Attributes

To enhance the functionality of cookies, some optional attributes may be used in Javascript. expires: Used to maintain the state of a cookie up to the specified date and time. document.cookie = ‘name=Jai; expires=Sun, 19 May 2019 18:04:55 UTC’ max-age: Used to maintain the state of a cookie up to the specified time in seconds. … Read more