RFC2616 HTTP/1.1 Reading Notes

  • 1,630 views
Uploaded on

Recently I finished reading the rfc2616, and have many gains to share

Recently I finished reading the rfc2616, and have many gains to share

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,630
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
33
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. RFC2616 HTTP/1.1
  • 2. Agenda
    RFC2616 HTTP/1.1概述
    基础术语和概念
    缓存
    工具
    讨论
  • 3. RFC2616 HTTP/1.1概述
    The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems.
    RFC2616
    21个章节
    协议参数、消息、请求、响应、实体、连接、方法、状态码、缓存、Header
  • 4. 基础术语和概念
    连接、消息、请求、响应、资源、实体、表述、内容协商、变量、客户端、User Agent、代理、网关、隧道、缓存、可缓存、显式过期时间、启发式过期时间、语义透明、证言(Validator)
  • 5. 基础术语和概念
    HTTP Operation
    Request
    User
    Agent
    Origin
    Server
    Response
    Request chain
    User
    Agent
    Origin
    Server
    Response chain
    Intermediaries: Proxies, gateways, tunnels
  • 6. 基础术语和概念
    协议的基本形式
  • 7. 基础术语和概念
    协议的基本形式(Augmented BNF)
    Name=definition(1#element)
    协议的主要组成
    Request Message
    Response Message
  • 8. 基础术语和概念
    Request
    Response
  • 9. 基础术语和概念
    REQUEST中的方法
    OPTIONS
    GET
    HEAD
    POST
    PUT
    DELETE
    TRACE
    CONNECT
  • 10. Status Code 状态码
    1xx 信息性
    2xx 成功性
    3xx 重定向
    4xx 客户端错误
    5xx 服务端错误
  • 11. HTTP缓存
    Caching would be useless if it did not significantly improve performance.
    HTTP/1.1中缓存的目的
    尽量减少发送请求的需求,“截止”机制
    尽量减少发送完整响应的需求,“证实”机制
    缓存的正确性
    与原始服务器检查是等效的
    “足够新”满足服务器对于更新的需要
    适当的304、305或错误(4x,5x)响应消息
  • 12. Expiration Model
    Server-specified Expiration
    Expires
    Cache-Control: max-age
    Heuristic Expiration 启发式截止
    Last-Modified
  • 13. Expiration Model
    Age Calculation
    Now – data_value
    Age value
    Expiration Calculation
    Max-age 优先级高于 Expires
    有max-age
    没有max-age
  • 14. Cache-Control
    Cache-Control:max-age=0
    Cache-Contro:no-cache
  • 15. Expiration Model
  • 16. Validation Model
    Last-Modified Dates
    Entity Tag Cache Validators - ETag
    Weak and Strong Validators
    强证言:实体或Header变化,证言就发生变化
    弱证言:只在语义改变明显时发生变化
  • 17. 工具
    工具的用途
    常见工具
    Firefox Extension Live HTTP Headers
    IE Http Watch
    Chrome Developer Tools
  • 18. Live HTTP headers
  • 19. IE HtppWATCH
  • 20. ChROME
  • 21. 展望
    Browser Caching
    不同服务器缓存类配置比较
    缓存的运维控制
  • 22. 参考资料
    FRC2616 HTTP/1.1
    Backus–Naur_Form
    RFC822 Standard for ARPA Internet Text Message