>

Thursday, 17 December 2015

cookies

A cookie is a small amount of named data stored by the web browser and is associated with a particular web page or website.
Provides the capability to web browser to memorize things like user preferences.
Javascript can manipulate cookies using the cookie property of the document object.
It is a string property that allows one to read,create,modify and delete cookies associated with the current web page.
In addition to a name and value,each cookie has optional attributes:
-expires : specifies the cookie's lifetime
-path:web pages with which it is associated
-secure:a boolean value,if set cookies are transmitted using HTTPS
Below example associates a cookie with the web page
Example:Display cookies stored in browser

0 comments:

Post a comment