Sunday 12 January 2014

Javascript : Working With Cookies - Part -1

Cookies : 
               When a small piece of information sent from website & stored in user's web-browser                during the time of browsing 

 For example : 
                     User Login information stored in cookies , whenever user request that particular                      web page the cookies fill the information
Note :
            Every time the user loads the website, the browser sends the cookie back to the                       server to notify the website of the user's previous activity

Understand Working :
  
  -> Server send data to user web browser in form of cookies
  -> User may allow to accept cookies or can reject it
  -> If user accept cookies then the cookies store in plain text in user system
  -> server remember the location and can retrieved the store information

Cookies stored with the following field
  • Expires : The date the cookie will expire. If this is blank, the cookie will expire when                       the visitor quits the browser.
  • Domain : The domain name of your site.
  • Path : The path to the directory or web page that set the cookie. This may be blank if                  you want to retrieve the cookie from any directory or page.
  • Secure : If this field contains the word "secure" then the cookie may only be retrieved                   with a secure server. If this field is blank, no such restriction exists.
  • Name=Value : Cookies are set and retrieved in the form of key and value pairs.

Next Blog we will see how many types of cookies are available ...

No comments:

Post a Comment