• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » What is HTTP Cookie

By Abhishek Ghosh February 10, 2024 5:24 pm Updated on February 10, 2024

What is HTTP Cookie

Advertisement

A cookie is a piece of text information that can be stored in the browser on the user’s computer about a website visited. A cookie is generated by the web server and sent to the browser via the Hypertext Transfer Protocol (HTTP). The browser stores the cookie and, as long as it is not deleted, transmits it back to the web server each time a page is accessed. A cookie can also be generated and read by the website via JavaScript.

Cookies are used to enable stateful web applications, for example, to store the login including the user-specific settings of a website or the shopping cart at an online retailer. This is implemented by storing a session identifier in the cookie, which allows a website to assign the user to a session stored on the server. Another purpose is user tracking for advertising purposes with specially prepared pages. The use of cookies for the analysis of user behavior and for advertising purposes requires the user’s consent.

In data protection, the term cookie is also used as a synonym for data extraction, data storage, data use, data utilization, data transfer and data misuse, regardless of whether an HTTP cookie is actually used for this purpose or other techniques are used.

Advertisement

---

A cookie consists of a name and a value. When defining a cookie, one or more attributes can or must also be specified. The attribute is intended to prevent access to cookies using JavaScript. Cookies that have the attribute cannot be accessed via JavaScript. This is a possible protection against cross-site scripting, as long as the browser used supports this attribute. According to RFC 6265, a browser should support the following minimum sizes:

  • A cookie should be able to contain at least 4096 bytes.
  • It should be possible to store at least 50 cookies per domain.
  • A total of at least 3000 cookies should be able to be stored.

The minimum sizes must be guaranteed by all participating browsers and servers. However, the specification does allow for larger cookies or a larger number of cookies.

 

How it Works

 

There are two ways in which a website can transmit, assign and evaluate cookies:

  • Transmission in the headers of requests and responses via HTTP. Cookies are created in the client when a cookie line is transmitted in addition to other HTTP headers in the server’s response when it accesses a web server.
  • In addition, a cookie can be generated locally by JavaScript or other scripting languages. The script is located in the web page submitted by the server.

The local cookies of the same domain – i.e. not of other websites – can be read, used and modified. For example, JavaScript can be used to incorporate information about local user activities that occurred during the session without further server contact. The next time you contact the website, they will also be transferred there in the HTTP headers.

Cookie information is stored locally in the browser, usually in a cookie database. Upon subsequent access to the web server, the client browser searches for all cookies from this domain that match the web server and the directory path of the current call. This cookie data is transmitted in the header of the HTTP access, so that the cookies may only be returned to the web server from which they once originated.

A cookie can contain any text, i.e. it can store arbitrary settings locally in addition to pure identification, but its length should not exceed 4 kilobytes in order to remain compatible with all browsers. Cookies are transmitted with any file submitted, including image files or any other type of file; this applies in particular to embedded elements such as advertising banners that are embedded by servers other than the origin of a displayed HTML file. For example, a single website can lead to multiple cookies that come from different servers and are sent back to them.

Cookies are managed exclusively by the client. Thus, the client decides whether, for example, a cookie is stored or deleted after the desired lifetime of the web server. However, corresponding information can also be stored on the server, for example to generate statistics on the number of visits to websites.

What is HTTP Cookie

 

Application

 

HTTP is a stateless protocol, so the page views are independent of each other for the web server. A web application whose interaction with the user lasts over several page views must work with tricks to be able to identify the participant across multiple accesses. For this purpose, a unique session identifier can be stored in a cookie by the server in order to recognize exactly this client on subsequent calls. For security reasons, electronic banking tends to use one one-time token per page view.

Online stores may use cookies to collect goods in virtual shopping carts. The customer can use it to add items to the shopping cart and continue to browse the website in order to then buy the items together. The identification of the user’s shopping cart or session is stored in the cookie, and the article identifiers are assigned to this shopping cart or session on the user’s web server. This information is only evaluated on the server side when the order is placed.

To ensure that user actions and inputs intended for the server are not lost in the event of a connection to the server (e.g. in mobile networks), cookies can be used for caching in web applications. When the connection is restored, they are queried by the server. The web application recognises the order in which the cookies were generated and marks cookies that have already been processed or deletes their content. Because this use may generate a large number of cookies, which are deleted at the earliest when the browser is closed, but the browser’s storage space for cookies is limited, the web application must take precautions against cookie overflow.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to What is HTTP Cookie

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Techniques for Identifying Users on the Web

    Anonymity sought by users on the Internet is limited by the transmission of the IP address during communication. Various forms of user tracking also make anonymous use more difficult. In addition, careless behavior by users leaves traces on the Internet. The greatest possible anonymity vis-à-vis most operators of services on the Internet can only be […]

  • How Web Application Works

    A web application is an application program based on the client-server model. Unlike traditional desktop applications, web applications are not installed locally on the user’s computer. Some of the data processing takes place on a remote web server. The results of the data processing are transmitted to the user’s local client computer (thin client). A […]

  • List of Open Source PHP MySQL Based E-Commerce Softwares

    List of Open Source PHP MySQL Based E-Commerce Softwares lists easily installable Free Softwares to create full fledged Business websites. Most are widely used.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

vpsdime

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cloud-Powered Play: How Streaming Tech is Reshaping Online GamesSeptember 3, 2025
  • How to Use Transcribed Texts for MarketingAugust 14, 2025
  • nRF7002 DK vs ESP32 – A Technical Comparison for Wireless IoT DesignJune 18, 2025
  • Principles of Non-Invasive Blood Glucose Measurement By Near Infrared (NIR)June 11, 2025
  • Continuous Non-Invasive Blood Glucose Measurements: Present Situation (May 2025)May 23, 2025
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2026 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy