零点课堂 | What Are Cookies?(1)

It's hard to navigate the Internet these days without coming across a box asking you to Accept All Cookies before you proceed. Perhaps you’re one of those mythical beasts that actually bothers to read the cookie and privacy policies. In reality, though, most of us will just accept them without a second thought.

You might have heard that Cookies have something to do with improving your experience. They're often used to tailor site content to your own preferences – like storing items in your online shopping cart between sessions, for example.

In this article, we'll take a deep dive into cookies: the good, the bad, and the ugly.

What is a cookie?

A cookie is a small file your computer stores on behalf of a website. There's a disappointing lack of sugar in them, unfortunately. The name, attributed to programmer Lou Montulli, is based on the name of another computing construct called a magic cookie.

But why do computers store that file? Well, there are a few different reasons. Broadly speaking, cookies help a web server to remember you. You'll do something on the website (it could be anything from switching to dark mode to logging in), and your computer makes a note of this. Then, the next time you visit, it hands the information back to the website.

Types of cookies

First-party cookies

Suppose that you visit everybody's favorite honey-badger-themed website, ilovehoneybadgers.com. It comes with plenty of customization options (e.g., changing your font to Comic Sans or switching the background color). A cookie that notes these preferences is saved to your computer. You navigate away to another mammal appreciation site and then close your browser, but when you come back, ilovehoneybadgers.com reloads your tailored settings based on the cookie.

This is a persistent cookie. It remains even after you close the browser (unlike a session cookie, which is destroyed upon quitting). It's also a first-party cookie because it was created by the website you visited (in this case, the ilovehoneybadgers.com domain).

声明:本文由 Binance撰写,零点财经收录,观点仅代表作者本人,绝不代表零点财经赞同其观点或证实其描述。

本文由 零点财经 作者:tao 发表,其版权均为 零点财经 所有,文章内容系作者个人观点,不代表 零点财经 对观点赞同或支持。如需转载,请注明文章来源。
分享生成图片
39

发表回复

零点课堂 | What Are Cookies?(1)

2021-03-17 9:48:46

It's hard to navigate the Internet these days without coming across a box asking you to Accept All Cookies before you proceed. Perhaps you’re one of those mythical beasts that actually bothers to read the cookie and privacy policies. In reality, though, most of us will just accept them without a second thought.

You might have heard that Cookies have something to do with improving your experience. They're often used to tailor site content to your own preferences – like storing items in your online shopping cart between sessions, for example.

In this article, we'll take a deep dive into cookies: the good, the bad, and the ugly.

What is a cookie?

A cookie is a small file your computer stores on behalf of a website. There's a disappointing lack of sugar in them, unfortunately. The name, attributed to programmer Lou Montulli, is based on the name of another computing construct called a magic cookie.

But why do computers store that file? Well, there are a few different reasons. Broadly speaking, cookies help a web server to remember you. You'll do something on the website (it could be anything from switching to dark mode to logging in), and your computer makes a note of this. Then, the next time you visit, it hands the information back to the website.

Types of cookies

First-party cookies

Suppose that you visit everybody's favorite honey-badger-themed website, ilovehoneybadgers.com. It comes with plenty of customization options (e.g., changing your font to Comic Sans or switching the background color). A cookie that notes these preferences is saved to your computer. You navigate away to another mammal appreciation site and then close your browser, but when you come back, ilovehoneybadgers.com reloads your tailored settings based on the cookie.

This is a persistent cookie. It remains even after you close the browser (unlike a session cookie, which is destroyed upon quitting). It's also a first-party cookie because it was created by the website you visited (in this case, the ilovehoneybadgers.com domain).

声明:本文由 Binance撰写,零点财经收录,观点仅代表作者本人,绝不代表零点财经赞同其观点或证实其描述。