I met the HTTP

What is the HTTP

  • Hyper Text Tranfer Protocol
  • stateless

Protocol analysis

The sustainable development

  • HTTP / 0.9
  • HTTP / 1.0
    • Add the Header
    • You have the status code
    • Multiple document states are supported
  • HTTP / 1.1
    • Links to reuse
    • The cache
    • Content negotiation
  • HTTP/2
    • Binary protocol
    • The header compression
    • Server push
  • HTTP/draft 3

Message parsing

Method

Method describe
GET
POST
PUT
DELETE
HEAD
CONNECT
OPTIONS
TRACE
PATCH

The safety of

  • GET HEAD OPTIONS
  • Idempotent (power, etc.)

Status code

RESTful API

Common protocol header

Common response headers

The cache

cookie

HTTP / 2 overview

  • The frame (frame)
  • binary
  • Message: A complete sequence of frames corresponding to a logical request or response message
  • Data stream: a bidirectional byte stream within an established connection that can carry one or more messages
  • Interleavable transmission

  • HTTP/2 connections are permanent and require only one connection per source
  • Flow control: The mechanism by which a sender is organized to send a large amount of data to a receiver

Summary of the HTTPS

Common scenarios

Static resource analysis

The sample

Cache +CDN+ file name hash

If cached server has updated content

Login Scenario Analysis

What action to what address

Authentication mode

Video playing scenario analysis

video

live

File upload scenario analysis

Cross-domain solutions

The practical application

The browser article

XHR

Fetch

The Node article

Axios library

The user experience

Network optimization

The stability of

To learn more