UncleCoder.com

UncleCoder.com

Free programming examples and instructions

JavaScript set expiry time of cookie

Code for set expiry time for cookies in javascript

by Athil


Posted on 25 Jun 2017 Category: Javascript Views: 586

Edited on 25 Jun 2017


Here I am going to show how to set expire time to a cookie in javascript.

Set Expire Timeout of cookie 

document.cookie = "cookiename=value; expires=Thu, 18 Jan 2018 12:00:00 UTC";


Leave a Comment:


Advertisement