I want to create a java script non persistent cookie so that I can store some value in it and pass on that value to some variable. Check for the value of null in cookies and if its null(i.e., the browser has been restarted, ) the new value should be allocated
to the cookie, but if the browser is not closed the value should persist, even after refreshing the page or on different page load.
vikram shah
Member
88 Points
260 Posts
Java Script Cookies
Nov 10, 2012 11:06 AM|LINK
I want to create a java script non persistent cookie so that I can store some value in it and pass on that value to some variable. Check for the value of null in cookies and if its null(i.e., the browser has been restarted, ) the new value should be allocated to the cookie, but if the browser is not closed the value should persist, even after refreshing the page or on different page load.
Thanks.
RichardY
Star
8376 Points
1573 Posts
Re: Java Script Cookies
Nov 10, 2012 11:12 AM|LINK
Check out this jquery plugin:
https://github.com/carhartl/jquery-cookie