What is Cookies in the Internet ?
Every day in the world of internet, you will definitely do some search. When you do some search on any website, the option of cookies will appear on your website. Many times people are afraid that this will not steal you information or hack any of your data. Let’s know what happens to these cookies? Is this a threat to our data?
What is Cookies?
Let us understand this with an example. Suppose you go to a hotel for the first time and you tell it the taste of your choice like you like less spicy, want more salt, black pepper is also liked. You are eating food in that hotel every day, but now you do not need to tell your choice every day, because the chef has also written your choice in a notes. He too has come to know what kind of food this person likes. Now this will save your time too and you will not have to work hard to tell the same thing again and again.
In the same way, when you search on some websites, some information about us related to that website is taken and it is kept in a file. The same file is called Cookies.
A cookie is a small piece of text file stored on user’s computer in the form of name-value pair.
Where Cookies is Used?
If you go to facebook.com and enter your ID password, the browser saves that ID Password in a file. Now from the next point, you will need to enter that ID Password repeatedly, now that work will be done by your browser.
When you search a website and where you go to find a language on that website, if you like your language, then the website saves that language in Cookies, so that when you next visit the same website again Come, it should be in the language that you liked.
Where Cookies Stored?
Now, where is this cookie file finally stored? This file is stored in your browser on your computer.
Google Chrome:- Settings > Cookies and other site data > See all cookies and site data (click to see).
You can check which website cookies stored in your browser.
Advantages of Cookies?
- Cookies saves both your data and time.
- Cookies makes your website experience faster.
- Cookies are simple to use and implement.
- Cookies persist a much longer period of time than Session state.
- If you are in the habit of forgetting a password, cookies can be your best friend.
Drawbacks of Cookies?
- Users can delete cookies as long as they want in the browser.
- Cookies can be blocked by using them in any browser.
- cookies are not secure as they are stored in clear text they may pose a possible security risk.
- Complex type of data not allowed (e.g. dataset etc). It allows only plain text (i.e. cookie allows only string content).
- Using third party cookies may result in viewing data from your other websites.
Cookies – Good or Bad?
Like if you do some shopping on amazon.com, that Amazon website will have its own cookies.
If you go to Flipkart.com, it will have its own cookies. If you go to Facebook, it will have its own cookies. Keep in mind that you should never use third party cookies because that data can be passed on any website to any website or may be needed.
How to Block Cookies?
- Google Chrome:- Settings > Cookies and other site data (click to see).
- Keep in mind that we always block third party cookies
- Never click Allow all cookies.
- Click Block third-party cookies in Incognito or Block third-party cookies.
How to Remove Cookies?
- Google Chrome:- Settings > Cookies and other site data > See all cookies and site data (click to see).
- If you want, click on Remove All and you can delete cookies of all websites simultaneously.
- Or the website whose cookies you want to delete. You can delete it by clicking in front of it.
Some Interesting Facts about Cookies
- Cookies are domain specific i.e. a domain cannot read or write to a cookie created by another domain. This is done by the browser for security purpose.
- Cookies are browser specific. Each browser stores the cookies in a different location. The cookies are browser specific and so a cookie created in one browser(e.g in Google Chrome) will not be accessed by another browser(Internet Explorer/Firefox).
- Most of the browsers store cookies in text files in clear text. So it’s not secure at all and no sensitive information should be stored in cookies.
- Most of the browsers have restrictions on the length of the text stored in cookies. It is 4096(4kb) in general but could vary from browser to browser.
- Some browsers limit the number of cookies stored by each domain(20 cookies). If the limit is exceeded, the new cookies will replace the old cookies.
- Cookie names are case-sensitive. E.g. Username is different than username.