The CORS specification defines a complex request as

  • A request that uses methods other than GET, POST, or HEAD
  • A request that includes headers other than Accept, Accept-Language or Content-Language
  • A request that has a Content-Type header other than application/x-www-form-urlencoded, multipart/form-data, or text/plain

缓存

强制缓存

cache-control

  • max-age
  • no-cache:缓存数据需要对比缓存来验证
  • no-store:不缓存内容,强制缓存、对比缓存都不触发
  • s-maxage
  • public
  • private

expires

对比缓存

last-modified/if-modified-since

last-modified 服务器发给客户端

if-modified-since 客户端发给服务器

Etag

Etag 服务器发给客户端

if-no-match 客户端发给服务器

三级缓存

  1. 内存
  2. 硬盘
  3. 从网络获取

计算机网络

TCP 握手

为什么两次不行

fastTCP

TLS 握手