HTTP,协议,学习总结

  1. 消息格式: start line + headers + body
    Request Message:

<method> <request-URL> <version>
<headers>
<entity-body>缓存

Repsonse Message:
<version> <status> <reason-phrase>
<headers>
<entity-body>
2.一共7种Method
HTTP,协议,学习总结服务器

  1. 一共5大类Status Code
    HTTP,协议,学习总结

4.基于TCP的HTTP问题
若是采用TCP短链接会带来较大的延迟,缘由:ide

  • TCP 三次握手(handshake)
  • TCP 延时确认(delay ack)
  • TCP 慢启动(slow start)
  • 服务器端频繁关闭TCP,致使TIME_WAIT Accumulation and Port Exhaustion

解决办法:学习

  • Parallel connections
    Concurrent HTTP requests across multiple TCP connections
    并行多TCP链接,
  • Persistent connections
    Reusing TCP connections to eliminate connect/close delays
    共有一个TCP长链接,HTTP/1.1 默认为长链接
    消除TCP connection延时
    delays
  • Pipelined connections
    Concurrent HTTP requests across a shared TCP connection
    消除数据传输延时(transfer latencies)
  • Multiplexed connections
    Interleaving chunks of requests and responses (experimental)3d

    1. 缓存控制
      HTTP,协议,学习总结
      HTTP,协议,学习总结

不缓存!
Cache-Control: no-store
Cache-Control: no-cache do-notserve-from-cache-without-revalidation.
Pragma: no-cache
Cache-Control: must-revalidateblog

相关文章
相关标签/搜索