How to Expire a Cookie in 30 min ? I am using a jQuery cookie. I am able to do something like this.
$.cookie(\"example\", \"foo\", { expires: 1 }); >
$.cookie(\"example\", \"foo\", { expires: 1 });
I had issues getting the above code to work within cookie.js. The following code managed to create the correct timestamp for the cookie expiration in my instance.
var inFifteenMinutes = new Date(new Date().getTime() + 15 * 60 * 1000);
This was from the FAQs for Cookie.js