Easy! IT | WEB | HTTP cookie

This article is a rough explanation of the HTTP status cookie.

Everything might be not exactly correct in this article but it’s very useful for beginners to understand IT terms. If you want to learn IT but you don’t have any experience to work in the IT industry, I wish it helps you to understand IT. And I hope this article makes you study IT more.

Let’s start our 3 minutes lesson!

What is the HTTP cookie?

  • HTTP cookies are derived from the term “magic cookie”.
  • HTTP cookies enable web servers to store stateful information.
  • HTTP cookies are usually used for a shopping website.

Magic cookies are already used in computing when the programmer had the idea of using them in web communications. The magic cookie is often used as a ticket – to identify a particular event or transaction. HTTP cookies use the same technology to retain information between web browsers and web servers without storing information in the server.

You better know what is HTTP before you read this article. The related article is here.

Easy! IT | WEB | World Wide Web | Japan Teams

Easy! IT | WEB | HyperText Transfer Protocol | Japan Teams

Easy! IT | WEB | HTTP method | Japan Teams

Study map of the web

1. Summary of HTTP

When clients who want to check the web page request content to servers, they ask WEB servers to give the web page.

Clients request the page.

When WEB servers receive requests, they respond to requests from clients. Servers transmit required data following HTTP rules.

Servers respond to requests.

It’s very simple but there are some rules to keep this simple system. One of those rules is stateless, “One request, One response”. Web servers don’t store any status and information while they exchange files with HTTP. It’s not too much to say that it’s impossible to manage the web shopping site. HTTP cookies resolve this problem.

2. If you don’t use HTTP cookies

What are computer cookies? (norton.com)

What would happen if the website didn’t use the cookie?

For example,

when the client(Mr Rubber) buy the ship on a website that doesn’t have cookie technology, you request the order form to the website(the WEB server).

The client wants to buy the product.

The website gives Mr Rubber back the order page.

The website responds to the clients.

Mr Rubber inputs necessary information but there is only a confirmation button. So he requests the submit page.

He inputs necessary information but he needs the submit button.

So the website returns the page to submit.

Mr Rubber clicks the SUBMIT button.

His “SUBMIT” is accepted.

The website accepts Mr Rubber’s order. But there is an HTTP rule “Stateless”. The website doesn’t have any information before the submit page. So the website accepts the submit, but it doesn’t understand that the submission is for an order. So the website accepts the request but does nothing for the order.

No information which Mr Rubber inputs before.

3. Role of HTTP cookies

Now you can see that the website needs something to restore the information if servers don’t restore the information by themselves. That’s the cookie. The cookie restores the status and information between the web browser and the servers.

The cookie is the kind of file. That file size is very small, so it doesn’t affect your laptops or mobiles.

Cookie files help to keep the information.
Your order is completed!

The cookie is very useful but there are some security problems. I’ll explain those problems in other articles.

I hope you get the rough image of “HTTP cookies”. If you need more details, please check other websites.

Information source: HTTP cookie – Wikipedia, What are computer cookies? (norton.com)

fin



コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA