What's a Browser Cookies

Cookies are small files which are stored on a user's computer. 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.
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.They are designed to hold a modest amount of data specific to a particular client and website, and can be accessed either by the web server or the client computer. This allows the server to deliver a page tailored to a particular user, or the page itself can contain some script which is aware of the data in the cookie and so is able to carry information from one visit to the website (or related site) to the next.


How Cookies Work :


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 any Website Urls then cookies generated and its prevents malicious other websites from snooping and stealing your login sessions.

Why are Cookies Used?

Cookies are a convenient way to carry information from one session on a website to another, or between sessions on related websites, without having to burden a server machine with massive amounts of data storage. Storing the data on the server without using cookies would also be problematic because it would be difficult to retrieve a particular user's information without requiring a login on each visit to the website.

If there is a large amount of information to store, then a cookie can simply be used as a means to identify a given user so that further related information can be looked up on a server-side database. For example the first time a user visits a site they may choose a username which is stored in the cookie, and then provide data such as password, name, address, preferred font size, page layout, etc. - this information would all be stored on the database using the username as a key. Subsequently when the site is revisited the server will read the cookie to find the username, and then retrieve all the user's information from the database without it having to be re-entered.

The time of expiry of a cookie can be set when the cookie is created. By default the cookie is destroyed when the current browser window is closed, but it can be made to persist for an arbitrary length of time after that.

Types of Cookies :

  •  Session:They expire when you close your browser (or if you stay inactive for a certain time). They’re used for example on e-commerce websites so you can continue browsing without losing what you put in your cart.

  • Third-party Cookies :  attributes usually corresponds to the website domain they are on. Not for third-party cookies—as you probably gathered from the name, they are installed by … third-party websites (no wayy), such as advertisers. They gather data about your browsing habits, and allow them to track you across multiple websites. Other websites using third-party cookies: Facebook, Flickr, Google Analytics, Google Maps, Google Plus, SoundCloud, Tumblr, Twitter and YouTube.
  • Permanent:They persist even when the browser is closed. They have an expiration date though and by law, you can’t make them last more than 6 months. They’re used to remember your passwords and login info so you don’t have to re-enter them every time.

Comments

Popular posts from this blog

What Is Global Positioning System - Introduction To GPS - How It Works

List of Hijacking of Indian Aeroplanes - 1971, 1981, 1982, 1984, 1993, 1999

The Benefits and Risks of Ultra-Violet Radiation