Browser Cookies:Truths & Myths

Browser cookies are very common – you probably have hundreds or even thousands stored in your browser right now.



Cookies are usually small text files, given ID tags that are stored on your computer's browser directory or program data subfolders.  Another way to think of this is that a cookie is a message given to a web browser from a web server that is then sent back to the web server whenever the browser requests a page from it. Cookies are used to identify users, store shopping cart information, and prepare customized web pages that utilize user information. The cookie may be used to remember a username, for example, so that the name will auto-fill on the user’s next visit. Cookies are created when you use your browser to visit a website that uses cookies to keep track of your movements within the site, help you resume where you left off, remember your registered login, theme selection, preferences, and other customization functions.The website stores a corresponding file(with same ID tag)to the one they set in your browser and in this file they can track and keep information on your movements within the site and any information you may have voluntarily given while visiting the website, such as email address.

Cookies only contain bits of text, not anything else. The text can be a user ID, session ID, or any other text. For example, web pages can be configurable – a web page could have a Hide link that hides a certain element on the page. The page can save this setting on your computer with a cookie. When you load the page in the future, the page can examine the cookie and automatically hide the element.

Cookies are an important browser feature – if you disable cookies, you’ll find yourself unable to log into websites. If you clear your cookies, you’ll be logged out of all websites and websites won’t remember any settings you’ve changed on them. 






Your web browser stores and manages cookies. You can find a list of websites storing cookies and view the cookies themselves – although it’s usually not interesting to look at the content of the cookies – in your browser’s settings. If you use multiple web browsers on your computer, each browser has its own set of cookies.



Websites are only allowed to look at their own cookies – for example, when you visit Coolhackingtricks, we can’t examine cookies from other websites. This prevents malicious websites from snooping and stealing your login sessions.

While cookies have important, good uses, they also have more questionable uses.Cookies may be disabled, or cookie options customized, due to privacy concerns and the risk of some cookies being used as spyware. It should be noted that because cookies are not executable files, they cannot be considered viruses as they do not have the ability to replicate. However, We’ve recently been hearing about tracking cookies and laws in the European Union forcing websites to explain their use of cookies to their visitors. 

There are various kinds of cookies depending upon their implication. Session cookies last only for as long as a user is on a website; they expire after the browser window is closed or the session times out. Persistent cookies (also known as tracking cookies) remain active for a period of time on a user’s machine and are used whenever the website is accessed. Secure cookies are used when accessing a website via HTTPS and are encrypted for greater safety. We might have issues with Persistent cookies in some cases.


Pros of Cookies


  • Cookies store your login state. Without them, you wouldn’t be able to log into websites. Websites use cookies to remember and identify you.
  • Cookies store preferences on websites. You couldn’t change settings and have them persist between page loads without cookies.
  • Cookies allow websites to provide personalized content. For example, if you’re shopping on Amazon, Amazon can remember the products you’ve browsed and recommend similar products – even if you’re not logged in.

Cons of Cookies

As we’ve seen, cookies have a number of very important uses. The web wouldn’t be what it is without them today.
However, cookies can also be used for more annoying purposes. Advertising and tracking networks use tracking cookies to track you across the web. When you visit website that uses scripts from an advertising network, that network can set a cookie in your browser. When you visit another website that uses tracking scripts from the same network, the advertising network can check the value of your cookie – it knows the same person visited both websites. In this way, the advertising networks track you across the web.
This information is used to target ads to you – for example, if you search for car insurance and later visit a news website, you may see advertisements for car insurance on the news website. The advertisements may not be related to the website you’re currently on, but they will be related to the websites you were visiting before. Depending on the advertising network, you may be able to opt out of this – as with the Google ads preferences page, which also shows the advertising categories you’ve been assigned by Google based on the websites you’ve been tracked across. For eg, we have been also featuring google ads on our page. So while reading our post, you are seeing ads of only those sites similar which you generally visit on your browser. If your wife/husband is using your device, the page will only show ads related similar to the websites visited by your wife/husband!
How to view/control cookies on my Web browser?
We will see this for few browsers as below:

Chrome
  1. From the Chrome menu in the top right corner of the browser, select Settings.
  1. At the bottom of the page, click Show advanced settings....
  1. Under Privacy, select Content settings....
  • To manage cookie settings, check or uncheck the options under "Cookies".
  • To view or remove individual cookies, click All cookies and site data... and hover the mouse over the entry. Select the X that appears next to the cookie to remove it.
  • To delete all cookies, click All cookies and site data... and select Remove all.
Firefox
  1. From the Tools menu, select Options.
  1. At the top of the window that appears, click Privacy.
  • To manage cookie settings, from the drop-down menu under "History", select Use custom settings for history. Enable or disable the settings by checking or unchecking the boxes next to each setting:
  • To allow sites to set cookies on your computer, select Accept cookies from sites. To specify which sites are always or never allowed to use cookies, click Exceptions.
  • To accept third-party cookies, check Accept third-party cookies. In the "Keep until:" drop-down menu, select the time period you wish to keep cookies on your computer.
  • To specify how the browser should clear the private data it stores, check Clear history when Firefox closes. Click Settings.... Check the items to be cleared when you close Firefox.
  • To view or remove individual cookies, click remove individual cookies.
  • To remove all cookies, from the History menu, select clear your recent history. Click the arrow next to "Details" to expand the menu, check the items you want to clear, and then click Clear Now.
Internet Explorer
Note:
On January 12, 2016, Microsoft ended support for Internet Explorer versions prior to version 11 . We strongly recommend that you upgrade to a new operating system if your current system does not support Internet Explorer 11.

  1. From the Tools menu, or the Tools drop-down at the upper right, select Internet Options.
  • To manage cookie settings, select the Privacy tab and click Advanced. To override the automatic cookie settings, click Override automatic cookie handling and then make your selections using the radio buttons.
  • To view or remove individual cookies, select the General tab. Under "Browsing history", click Settings. Select either View objects or View files.
  • To delete all cookies, under "Browsing history", click Delete.... Check Cookies and then click Delete.

  1. If the menu bar is hidden, press Alt to make it visible.
This content is adapted from Microsoft Help and Support article 278835.
Safari
Note: To determine the version of Safari you're using, from the Safari menu, select About Safari.
Safari 5.1 and later
  1. In Safari, from the Safari menu, select Preferences....
  1. In the Safari preferences window, click Privacy.
  • To manage cookie settings, next to "Block cookies", select From third parties and advertisersAlways, or Never.
  • To view or remove individual cookies, click Details.... Select the cookie to delete and click Remove.
  • To delete all cookies, select Remove All Website Data... In the window that appears, select Remove Now.
Safari 5.0.x and earlier
  1. In Safari, from the Safari menu, select Preferences....
  1. In the Safari preferences window, click Security.
  • To manage cookie settings, next to "Accept Cookies:", select Always or Only from sites you navigate to. To disable cookies, select Never.
  • To view and delete individual cookies, click Show Cookies. In the sheet that drops down, you can browse the list of cookies on your computer.
  • To delete all cookies, click Show Cookies. In the window that appears, select Remove All.

Generally, above browsers are used by the people around the globe. In case you are using other browser, a little tweaking with the settings will find you the solutions.

To understand jovascript cookies and design them, you might want to visit our partner site https://www.w3schools.com/

Please get back to us with your queries, suggestions or concerns by replying to this post.

And folks, please keep liking our facebook page Hacknstuff

No comments: