|
|
Javascript cookies - Javascript
|
Views : 246
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Javascript Cookies:
Cookies are small text files stored in your browser. Cookies can be read by JavaScript too.
Javascript Cookies contains some data:
1. A name-value pair containing the actual data
2. An expiry date after which it is no longer valid
3. The domain and path of the server it should be sent to
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString();
Example:
var expires = new Date();
expires.setDate(expires.getDate() + 7); // 7 = days to expire
document.cookie = "name=test;expires=" + expires.toGMTString(); |
|
By Ramya, On - 2010-01-28 |
|
|
|