Sunday, July 12, 2009

How Cookie Works

How Cookie works

Hallo Friends,

Now you will ask us that in your last posting you discussed us that cookies are not computer programs so how will they work and how can they work and yes you are right its not a computer Program and nor a virus but in spite of that it works and how it works. Actually it works as a passive worker that means when it stays in your computer it helps the browser and server to work freely and smoothly. In our last posting we discussed about the types of cookies and if you read about that then this posting will help you to understand this topic.

The manner through which cookie moves data

· If you type the URL of a Web site into your browser, your browser sends a request to the Web site for the page. For example, if you type the URL http://www.google.com into your browser, your browser will contact Google's server and request its home page.

· When the browser does this, it will look on your machine for a cookie file that Google has set. If it finds an Google cookie file, your browser will send all of the name-value pairs in the file to Google's server along with the URL. If it finds no cookie file, it will send no cookie data.

· Google's Web server receives the cookie data and the request for a page. If name-value pairs are received, Google can use them.

· If no name-value pairs are received, Google knows that you have not visited before. The server creates a new ID for you in Google's database and then sends name-value pairs to your machine in the header for the web page it sends. Your machine stores the name-value pairs on your hard disk.

· The Web server can change name-value pairs or add new pairs whenever you visit the site and request a page.

There are other pieces of information that the server can send with the name-value pair. One of these is an expiration date. Another is a path (so that the site can associate different cookie values with different parts of the site).

You have control over this process. You can set an option in your browser so that the browser informs you every time a site sends name-value pairs to you. You can then accept or deny the values. (source howstaffworks)

Thanks

Urproblemmysolution Team

No comments: