什么是 RESTful API?
What is a RESTful API?
RESTful API 用 HTTP 的 GET、POST 等方法对资源(用 URL 表示)进行增删改查,风格简单、无状态,便于互联网服务互联。
A RESTful API uses HTTP methods like GET and POST on URL-identified resources to create, read, update, and delete, with a simple, stateless style that suits internet services.
难度 专业 · 适合 高中(15-18)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#REST #API #HTTP
Cookie 和 Session 有什么区别?
What is the difference between a Cookie and a Session?
Cookie 是存在浏览器里的小段数据,每次请求自动带上;Session 是存在服务器端的用户状态,通常只把一个会话 ID 用 Cookie 传给浏览器。
A Cookie is a small piece of data stored in the browser and sent with each request; a Session is server-side user state, usually identified by a session ID passed to the browser via a cookie.
难度 专业 · 适合 大众
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#Web #状态
什么是 cookie,网站用它做什么?
What is a cookie and what do websites use it for?
Cookie 是网站存在你浏览器里的小数据,用来记住登录状态、偏好等,让网站跨页面和访问认出你。
A cookie is a small piece of data a site stores in your browser to remember login state and preferences, recognizing you across pages and visits.
难度 专业 · 适合 高中(15-18)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#Cookie #会话 #跟踪
网址前面的 https 是什么意思?
What does the https in a web address mean?
HTTPS 是在 HTTP 之上加了加密的网页传输协议,能让浏览器和网站之间的通信不被窃听和篡改。
HTTPS is HTTP with encryption added, so communication between your browser and the website cannot be eavesdropped on or altered.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#HTTPS #加密 #Web
HTTP 状态码 301 和 302 有什么区别?
What is the difference between HTTP 301 and 302?
301 表示资源被永久移动到新地址,浏览器和搜索引擎会把 SEO 权重转移到新 URL 并缓存重定向;302 表示临时重定向,客户端应继续用原地址,不转移权重。
301 means the resource moved permanently, so clients and search engines transfer SEO weight and cache the redirect; 302 is temporary, so clients keep using the original URL and no weight is transferred.
难度 进阶 · 适合 大众
CC BY 4.0 · 已核验 · Verified 2026-11-05
来源 · Source
互联网工程任务组(IETF),《HTTP Semantics》,RFC 9110,2022 (DOI: 10.17487/rfc9110)
IETF, 'HTTP Semantics', RFC 9110, 2022, DOI: 10.17487/rfc9110
独立核验依据 · Independent verification: 核验依据 1 Crossref DOI 10.17487/rfc9110; RFC 9110
#HTTP #重定向
CORS 是什么,为什么浏览器要限制跨域请求?
What is CORS and why do browsers restrict cross-origin requests?
浏览器默认遵循“同源策略”,禁止网页向不同域名随意发请求,以防恶意网站冒用你的身份去调接口。CORS 是一套服务器用响应头声明“允许哪些来源”的机制,在安全和便利之间开了可控的口子。
Browsers enforce the same-origin policy, blocking pages from freely calling other domains to stop malicious sites abusing your identity. CORS is a mechanism where the server declares via response headers which origins are allowed—a controlled exception for safety and convenience.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#CORS #跨域
什么是域名,它和网址有什么关系?
What is a domain name and how is it related to a web address?
域名是网站好记的名字(如 example.org),网址(URL)在域名前加上协议和路径,完整描述要访问的资源位置。
A domain name is a site's memorable name (like example.org); a URL adds protocol and path before it to fully describe the resource's location.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#域名 #URL #Web
什么是前端和后端?
What are frontend and backend?
前端是用户在浏览器里看到的界面部分;后端是在服务器上处理数据、逻辑和数据库的部分,两者通过网络接口协作。
The frontend is the interface users see in the browser; the backend runs on servers to handle data, logic, and databases, and the two collaborate via network interfaces.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#前端 #后端 #架构
HTML、CSS 和 JavaScript 各是做什么的?
What do HTML, CSS, and JavaScript each do?
HTML 搭出网页的结构和内容,CSS 负责外观和排版,JavaScript 让网页能互动和动态变化。
HTML builds a page's structure and content, CSS handles its appearance and layout, and JavaScript makes the page interactive and dynamic.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#HTML #CSS #JavaScript
网页刚打开时文字为什么会先空白一下或先用别的字体,font-display 能控制什么?
Why does text on a freshly loaded page flash blank or appear in the wrong font first, and what does font-display control?
浏览器排版时若发现某段文字要用尚未下载完的自定义字体,只能在两种坏结果里选一个:等字体到位期间把文字藏起来,即无形文字闪烁(FOIT);或者先用后备字体画出来再替换,即无样式文字闪烁(FOUT),字形和字宽会跳动一下。CSS 的 font-display 描述符把这个策略交给作者:block 给约三秒阻塞期偏向 FOIT,swap 几乎立刻用后备字体偏向 FOUT,fallback 与 optional 用很短的阻塞期并允许在网络较差时干脆放弃替换。正文通常选 swap 优先保证可读,再配合 preload 与后备字体度量对齐(size-adjust)把跳动降到最低。
When the browser lays out text that needs a web font still in flight, it must choose between two bad outcomes: hide the text until the font arrives, a flash of invisible text, or draw it with a fallback and substitute later, a flash of unstyled text in which glyph shapes and widths visibly jump. The CSS font-display descriptor hands that policy to the author: block favours invisible text with a roughly three-second block period, swap shows the fallback almost immediately, and fallback and optional use a very short block period and may abandon the substitution entirely on a slow connection. Body copy normally uses swap to protect readability, combined with preload and fallback metric matching through size-adjust to minimize the reflow.
难度 进阶 · 适合 初中(12-15)
CC BY 4.0 · 来源待核验 · Source pending review
来源 · Source
出处备注:著录仅给书名,无版次与年份;同一书名常对应多个版次,不臆测具体版本。
W3C《CSS Fonts Module Level 4》中 font-display 描述符一节;MDN Web Docs《font-display》
W3C, "CSS Fonts Module Level 4," the font-display descriptor; MDN Web Docs, "font-display"
#网页字体 #font-display #无形文字闪烁 #渲染阻塞
CSRF 和 XSS 有什么本质区别,为什么防御手段完全不同?
What fundamentally separates CSRF from XSS, and why are their defences unrelated?
XSS 是攻击者把脚本注入到用户信任的页面里执行,脚本运行在该源之下,可以任意读写 DOM、窃取令牌、代替用户操作,根因是输出未按上下文转义;CSRF 不注入任何代码,而是诱使已登录的浏览器自动带上 Cookie 发出攻击者构造的请求,根因是服务器把「带了 Cookie」当成了「用户本意」。因此 XSS 靠按上下文转义输出、用 CSP 限制脚本来源、避免直接拼接 innerHTML 来防;CSRF 靠要求请求携带跨站页面无法伪造的证据来防,即同步器令牌或双提交 Cookie,配合 SameSite=Lax/Strict 和校验 Origin 头。注意存在 XSS 时脚本能读走任何 CSRF 令牌,所以必须先堵住 XSS。
XSS injects attacker-controlled script into a page the victim trusts, so it executes in that origin and can read the DOM, steal tokens and act as the user; the root cause is output that was not escaped for its context. CSRF injects no code at all: it lures an already-authenticated browser into issuing an attacker-crafted request that automatically carries the session cookie, and the root cause is a server treating cookie presence as proof of intent. Hence XSS is closed by context-aware output encoding, a Content Security Policy restricting script sources and avoiding raw innerHTML, whereas CSRF is closed by demanding evidence a cross-site page cannot forge — synchronizer tokens or double-submit cookies, plus SameSite=Lax/Strict and Origin header validation. Note that an XSS hole lets script read any CSRF token, so XSS must be fixed first.
难度 进阶 · 适合 高中(15-18)
CC BY 4.0 · 来源待核验 · Source pending review
来源 · Source
出处备注:著录仅给书名,无版次与年份;同一书名常对应多个版次,不臆测具体版本。
OWASP Cheat Sheet Series《Cross-Site Request Forgery Prevention》与《Cross Site Scripting Prevention》
OWASP Cheat Sheet Series, "Cross-Site Request Forgery Prevention" and "Cross Site Scripting Prevention"
#CSRF #XSS #同步器令牌 #SameSite
什么是 API(应用程序接口)?
What is an API (application programming interface)?
API 是一套约定好的“点单窗口”:你按它规定的格式发请求,它返回数据或帮你完成操作,而不必关心内部怎么实现。就像餐厅服务员,你不必进厨房,只要点菜就能上菜。
An API is an agreed 'order window': you send requests in its format and get data or actions back, without knowing the internals. Like a waiter—you just order and the food comes, no kitchen access needed.
难度 入门 · 适合 大众
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#API #接口
什么是网页浏览器?
What is a web browser?
浏览器是帮你打开网站的程序,它把网页代码变成你能看到的文字、图片和按钮,比如 Chrome 和 Safari。
A browser is a program that opens websites, turning web code into the text, images, and buttons you see, such as Chrome and Safari.
难度 入门 · 适合 大众
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#浏览器 #Web #基础
什么是 HTTP?
What is HTTP?
HTTP(超文本传输协议)是浏览器与服务器之间传输网页数据的应用层协议,基于请求-响应模型,默认通过 80 端口通信。
HTTP (HyperText Transfer Protocol) is the application-layer protocol browsers and servers use to exchange web data; it follows a request-response model and typically runs on port 80.
难度 入门 · 适合 小学低段(6-8)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#网络 #协议
什么是 Cookie,网站为什么要用它?
What is a cookie and why do websites use it?
Cookie 是网站存在你浏览器里的一小段信息。因为网页每次访问都是“不认识你”的,Cookie 帮网站记住你是谁、登录状态或购物车,下次访问就能接着上次的体验。
A cookie is a small piece of info a site stores in your browser. Since each web visit is 'anonymous', cookies let the site remember who you are, your login or cart, so the next visit continues where you left off.
难度 入门 · 适合 小学低段(6-8)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#Cookie #会话
从浏览器输入 URL 到页面显示,背后发生了什么?
What happens behind the scenes from typing a URL to the page rendering?
流程包括:DNS 解析得到 IP;TCP 三次握手与 TLS 握手建立连接;浏览器发送 HTTP 请求;服务器返回 HTML;解析 DOM/CSSOM 生成渲染树;执行 JS、布局与绘制;期间可能触发多次重定向、预连接与缓存判断。
It involves DNS resolution to an IP, a TCP and TLS handshake, an HTTP request, HTML response parsing into a render tree from DOM/CSSOM, JS execution, layout and paint, plus redirects, preconnects and cache checks along the way.
难度 入门 · 适合 初中(12-15)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#浏览器 #渲染
服务端渲染(SSR)和客户端渲染(CSR)有什么区别?
What is the difference between SSR and CSR?
SSR 在服务器生成完整 HTML 再发给浏览器,首屏快且利于 SEO;CSR 由浏览器用 JS 拉取数据并渲染,交互更流畅但首屏慢、对搜索引擎不友好,常结合使用。
SSR sends server-generated HTML for fast first paint and good SEO; CSR lets the browser fetch data and render via JS for smoother interaction but slower first paint and weaker SEO—often combined.
难度 入门 · 适合 小学低段(6-8)
CC BY 4.0 · 来源待核验 · Source pending review
来源 · Source
出处备注:本题原挂出处与答案内容不符,已撤回;具体书目待补,暂不展示来源。
本题原挂出处与答案内容不符,已撤回;具体书目待补。
Previous citation withdrawn as unsupported for this answer; a specific source is pending.
#Web #渲染
点一下链接会发生什么?
What happens when you click a link?
点链接就像请浏览器去另一个网页做客,浏览器会找到那个网页并把内容搬回来给你看。
Clicking a link asks the browser to visit another page; the browser finds it and brings the content back for you to see.
难度 入门 · 适合 小学低段(6-8)
CC BY 4.0 · 已核验 · Verified 2026-08-23
来源 · Source
Kurose & Ross,《Computer Networking: A Top-Down Approach》第8版,Pearson,2021
J. F. Kurose and K. W. Ross, Computer Networking, 8th ed., Pearson, 2021
#链接 #浏览器 #Web