We have seen cookies in our computers, mobile phones etc. But do you know what a cookie is? Cookies are small text files stored on our computer, which are designed to keep a modest amount of data specific to a particular website and client, and can be accessed either by internet server or the client computer.
A cookie allows delivering a page tailored to a specific user. Or the page itself will contain some script that is aware of the data in the cookie. And then is able to hold information from one visit to the website to the next. A cookie is usually a small lookup table consisting of a pair of values.
Different browsers use different methods for storing cookies. For example, Microsoft Internet Explorer stores these files in Temporary Internet Files folder, and Firefox keeps them in a sqlite file in the user profile folder. They are in the form of random numbers, letters and symbols. This is not in a form that makes sense only to the server and not to the user.
When are cookies created?
Writing data to a cookie is typically done when a new webpage is loaded – for example after a ‘submit’ button is pressed the data handling page would be liable for storing the values in a cookie. If the user has selected to disable cookies then the write operation will fail; and subsequent sites which think about the cookie can either have to take a default action; or prompt the user to re-enter the data that would have been stored within the cookie.
Cookies are a convenient way to carry data from one session on a website to another, or between sessions on connected websites; without having to burden a server machine with large amounts of information storage. Storing the data on the server without using cookies would also be problematic. Because it might be difficult to retrieve a specific user\’s information without requiring a login on each visit to the website.
If there’s a large amount of data to store, then a cookie will simply be used as a method to identify a given user so that further connected information may be looked up on a server-side database.
How long does a Cookie last?
The time of expiration of a cookie is often set when the cookie is made. By default the cookie is destroyed when the present browser window is closed. But it can be created to persist for an arbitrary length of time subsequently.
How secure are Cookies?
There is lots of concern regarding privacy and security on the internet. Cookies do not present a threat to privacy, since they can only be used to store data that the user has volunteered or that the web server already has. While it’s possible that this data may be made available to specific third party websites; this is no worse than keeping it in a central database.
If you’re concerned that data you give to a web server will not be treated as confidential ; then you must question whether you actually need to give that information at all.0