Change Cookie To Expire From 1 Day To 8 Hours?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
Hi,
How can I change the following code to have the cookie expire in 8 hours instead of 1 day as it does now?
// key and at least value given, set cookie... if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value == null)) { options = $.extend({}, $.cookie.defaults, options); if (value == null) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = String(value);
Thanks
0
Kudos
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Highlight
- Report Inappropriate Content
Is this a homework question ?
Because somebody asked this word for word way back in 2008
http://www.webhostingtalk.com/showthread.php?t=1235394
Lovelogic.net UK Jobs Scanner
0
Kudos
