Browsers that support cookies have a file called cookies.txt in one of their directories. That file (and only that file) is available for web sites that make use of cookies to write a small amount of information to that single file for later use. Most commonly this exchange is used with online ordering where there's a shopping cart system, etc; the server passes you a cookie that details your choices so that as you move from page to page making selections, you can just "toss it in your shopping cart", and when you go to order, the system reads back what you've selected, and can total your order.

Cookies can also be used to provide users with customized versions of web sites (say on a programming page, it will serve up info on BASIC programming, but not C++). At other times, some sites want to keep track of how often you visit; the date and time of your last visit might be stored in your cookies.txt file, and retrieved by the site the next time you visit there, generating information for an administrative report.
A site using cookies CANNOT read anything on your hard drive except for the the information in your cookies.txt file that IT SPECIFICALLY wrote there previously. No site can read any information in the cookies.txt file that it didn't write itself.
The cookies.txt file DOES NOT record everything you do. The file itself is a plain text file. Just like any other plain text file on your system, it cannot of its own accord record, send, read, or do anything. Your browser, acting upon a request by the server, will read or write to the cookies.txt file.
Think of this like an ATM machine. You put your card in, and ask "how much money do I have", and the machine will tell you. You cannot put your card in the machine and ask "How much money does that guy who was ahead of me have"; you are only allowed access to YOUR data. Same with the cookies.txt file; a site is only allowed access to the data it previously "banked" there.
The cookies.txt file DOES NOT indiscriminately give out your name and email address. If you submit such data to a site using cookies it may store that information in your cookies.txt file for its own use later, but only by virtue of your having given it to them. As stated above, only the site that wrote the cookie has access to this data.

A simple cookie

All this JavaScript does is make a note in your cookies.txt file of the number of times you have been to this page.
Click the "REFRESH" button on your browser, then when you come back to this page hopefully the number below will have changed.
If you are revisiting this page after an earlier surfing session, the correct number of times you have been here should be displayed.
Now you know how cookies work.

You have visited this page
times.

---------------===============*===============---------------

Pssst!
Want to Make Some Money?
Make money doing surveys. Its Totally Free.
No money to send, just get checks in the mail
Honest pay for Honest Work
=== Click Here ===