What is a cookie and what does it do?
Cookies are saved on the user’s computer and are tiny files that contain some pieces of data. This data relates to a specific client or site and it may be accessed by these clients and sites. This happens so that the server can accurately deliver a page with content that is relevant to the user. Alternatively, the page the user receives might have a script attached to it that will read the data inside the cookie and transport information from the current website to another. Secure websites can utilize cookies to validate the user’s identity as they browse from page to page; if cookies weren’t used, then the user would have to log in every time he or she would add a product to their shopping cart or wishlist.
Are Cookies Enabled in my Browser?
To find out if your browser accepts cookies, you can visit the Cookie Checker. This page will try and create a cookie and let you know whether your browser has accepted it or not. What’s in a Cookie? Every cookie is basically just a small table that contains data values that are paired together (i.e. firstname, John) (lastname, Smith). The code that runs on the server or the client computer will read the cookie, extract the relevant data and then use these to serve the user a customized web page.
When are Cookies Created?
When a webpage is loaded, like for example when the user presses a ‘submit’ button, the code that handles data on that page will attempt to write the values created by this interaction into a cookie. If, however, the user has disabled all cookie functionality, this attempt will fail. This means that other pages that would rely on the data inside the cookie will now need to take a default action or ask the user to re-submit the information that would normally have been stored in the cookie.
Why are Cookies Used?
To stop the server machines from having to handle and store tons of data, we use cookies to conveniently carry information from one session on a website to another website, or even data from one website session to a session on a different (but relevant) website. Having the server store all the user’s data without cookies would also create the need for the users to keep logging in every time they visit the same site. By using cookies, the server machine can easily look up the user’s name from the cookie to identify them and then use this information to look up any other relevant information the server has stored for that specific user. For example, a person visiting a site for the first time will choose a username for their account and that will be stored inside the cookie the page creates. Using this username as the key, the server can now go into its own database and save that user’s password, full name, address, font size, page layout, etc. When that person revisits the website, the server will read the cookie to find the user’s name and automatically retrieve every other relevant data, without needing to have all this information re-entered.
How Long Does a CookieLast?
The amount of time a cookie can live is set when that cookie is first created. By default, most cookies are programmedto be deleted when the current browser window is closed. However, cookies can also be made to persist for an arbitraryamount of time after their creation.
Who Can Access Cookies?
Cookies allow users to tweak the ‘root domain’ setting in order to control the cookie’s visibility, basically making it so only URL’s from that root domain can access and view the data inside the cookie. If the ‘root domain’ is set to “examplesite“, for example, then the cookie can only be accessed by the sites in “www.examplesite” or “xyz.examplesite” or “whatcookiesare.com”. This is done so that information stored inside that particular cookie can be shared with relevant pages. However, a user cannot set the ‘root domain’ property to ‘top-level’ domains like ‘.com’ or ‘.co.uk’, as this would allow the cookie to be viewed by almost everyone. Cookies, by default, can be accessed by all the paths in the domains when they are first created, but they may be customized to be visible only by specific subdirectories (i.e.”www.examplesite.com/images“)
How Secure are Cookies?
Privacy and security while browsing the Internet is a serious matter. Since cookies only store information that the user has voluntarily provided or that web servers already have, they do not endanger a user’s privacy by themselves. It is true that the information contained in a cookie can be viewed by certain third-party websites, but the same can also potentially happen if this information would be stored in a central database. If the risk of having your personal information that you share with a web server is unacceptably high, then you ought to question whether sharing this information is actually necessary.
What are Tracking Cookies?
Several commercial websites include advertisements that are actually served from a different website. These adverts may also store a cookie for that specific third-party site containing information that is provided by the site that contains these ads. This information may be the site’s name, what kinds of products the user viewed, what pages they visited, etc. When that user visits a site that also contains advertisements from that same third-party website, the cookie will provide the advertiser with information about the user. This will enable the publisher to serve that user with ads that are more likely to interest them, based on that user’s interests. A lot of people feel that tracking cookies are an invasion of their privacy, as they enable advertisers to build profiles of these users without their permission or consent.
How to enable cookies?
- Google Chrome
- Mozilla Firefox
- Microsoft Internet Explorer
- Safari (Mac)