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

相關文章
相關標籤/搜索