* New post Constructor Destructor and Inheritance& Array , Virtual base class in c++ language

Monday, 13 May 2013

0 Cookies

Cookies
The term cookies has no special signifinance .It is just a name in the same way java is just a name for sun's oop (object-oriented programming language). When a user request a page , an http request is sent to the server . The request includes a header that defines several pieces of information , including the page being requested. Then the server return an http response that also includes a header . The header contains information about the document being returned , including its MIME type. These header all contain one or more fields of information in a basic format.
     FieldName: Information 
Cookie information is shared between the client browser and a server using fields in the HTTP headers . When the user request a page for the first time , a cookie can be stored in the browser by a set-cookie entry in the header of the response from the server. The set-cookie field includes the information to be stored in the cookie along with several optional pieces of information including an expiry date , path , and server information and if the cookie requires security. Then , when the user request a page in the future , if a matching cookie is found among all the stored cookie , the browser sends a cookie field to the server in a request header. The header will contain the information stored in that cookie.
The set-cookie and cookie fields use a syntax to transfer significant information between client and server.
Setting a Cookie 

   Set-cookie :Name =value ; Expires= date; Path=Path;Domain;SECURE
Name
Specifies the name of the cookie.
PATH = path

Specifies the path portion of the URL s for which the cookie is valid. If the URL matches both the PATH and the  DOMAIN  , then the cookie is sent to the server in the request header.
EXPIRES =date

Specifies the expiry  date of the cookie . After  this date the cookie will no longer be stored by the client or sent to the server . By default the value of expires is set to the end of current  navigator session.
DOMAIN = domain
Specifies the domain portion of the URLs for which the cookie is valid. The default value for the attribute is the domain of the current document setting the cookie.
SECURE
Specifies the cookie should only be transmitted over a secure link


0 comments:

Post a Comment

 

PROGRAMMINGqueen Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates

Blogger Widgets