Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js-cookie set expiration of cookie

var inFifteenMinutes = new Date(new Date().getTime() + 15 * 60 * 1000);
Cookies.set('foo', 'bar', {
    expires: inFifteenMinutes
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #expiration #cookie
ADD COMMENT
Topic
Name
6+1 =