01 · What is it?
A cookie is a small piece of data that a website stores in the browser.
Cookies can be sent back to the server with later requests.
Simple Definition: A cookie helps a website remember information between requests.
A small piece of data stored by the browser and associated with a website.
A cookie is a small piece of data that a website stores in the browser.
Cookies can be sent back to the server with later requests.
Simple Definition: A cookie helps a website remember information between requests.
Think of a cookie as a small note the website gives to the browser.
The browser keeps the note and may send it back when the user returns.
Cookies can help websites remember:
Cookies are commonly used in web applications for:
Example: A user logs in.
The server creates a session.
The browser receives a cookie.
Later requests include that cookie.
The cookie helps the server connect later requests with the same browser session.
Cookies are stored in the browser but can also be sent with HTTP requests.
They are often part of login and session flows.
Small browser data that can be sent automatically with HTTP requests.
Browser data that JavaScript reads and writes directly.
| ENGLISH TERM | 中文 | SIMPLE ENGLISH | 中文小白理解 |
|---|---|---|---|
| Cookie | Cookie / 浏览器 Cookie | A small piece of data stored by the browser for a website. | 网站保存在浏览器中的一小段数据。 |
| Browser | 浏览器 | Software that stores and sends cookies. | 保存 Cookie 并在需要时发送给服务器的软件。 |
| Server | 服务器 | A system that may create or read cookies during web requests. | 在 Web 请求中可能创建或读取 Cookie 的一端。 |
| Session | 会话 | A way to keep track of a user's interaction over time. | 用来保存用户一段时间内登录或操作状态的机制。 |
| Session Cookie | 会话 Cookie | A cookie used to help identify a browser session. | 用来帮助服务器识别某个浏览器会话的 Cookie。 |
| Request | 请求 | A message that may include cookies when sent to a server. | 发送给服务器时可能携带 Cookie 的请求。 |
| Response | 响应 | A server response that can send a cookie to the browser. | 服务器返回给浏览器时可以携带 Cookie 的响应。 |
| Authentication | 身份认证 | The process of checking who a user is. | 判断用户身份是谁的过程。 |
| Preference | 用户偏好 | A setting such as language or display choice. | 用户对语言、显示方式等功能的设置。 |
| Local Storage | 本地存储 | Browser storage that is different from cookies. | 浏览器中的另一种本地数据保存机制。 |
Cookies store small pieces of data in the browser.
Cookies can be sent with later web requests.
Cookies are commonly used for sessions and login-related behavior.