HTTP (超文本传输协议) 是 应用程序层 protocol for transmitting hypermedia documents, such as HTML. It was designed for communication between web browsers and web servers, but it can also be used for other purposes. HTTP follows a classical client-server model , with a client opening a connection to make a request, then waiting until it receives a response. HTTP is a stateless protocol , meaning that the server does not keep any data (state) between two requests. Though often based on a TCP/IP layer, it can be used on any reliable transport layer , that is, a protocol that doesn't lose messages silently like UDP does. RUDP — the reliable update of UDP — is a suitable alternative.
Learn how to use HTTP with guides and tutorials.
The basic features of the client-server protocol: what it can do and its intended uses.
Caching is very important for fast Web sites. This article describes different methods of caching and how to use HTTP Headers to control them.
Set-Cookie
HTTP header with the response. The client then returns the cookie's value with every request to the same server in the form of a
Cookie
request header. The cookie can also be set to expire on a certain date, or restricted to a specific domain and path.
http://domaina.example/
) makes a request for an image on Domain B (
http://domainb.foo/image.jpg
) via the
img
element. Web pages today very commonly load cross-site resources, including CSS stylesheets, images, scripts, and other resources. CORS allows web developers to control how their site reacts to cross-site requests.
A brief description of the changes between the early versions of HTTP, to the modern HTTP/2, the emergent HTTP/3 and beyond.
A collection of tips to help operational teams with creating secure web applications.
Describes the type and structure of the different kind of messages of HTTP/1.x and HTTP/2.
Shows and explains the flow of a usual HTTP session.
Describes the three connection management models available in HTTP/1.x, their strengths, and their weaknesses.
Browse through detailed HTTP reference documentation.
X-
prefix; others in an
IANA registry
, whose original content was defined in
RFC 4229
. IANA also maintains a
registry of proposed new HTTP message headers
.
GET
,
POST
, and also less common requests like
OPTIONS
,
DELETE
,或
TRACE
.
HTTP response codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: informational responses, successful responses, redirections, client errors, and servers errors.
Content-Security-Policy
response header fields allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.
Helpful tools and resources for understanding and debugging HTTP.
A project designed to help developers, system administrators, and security professionals configure their sites safely and securely.
Tools to check your cache-related headers
A very comprehensive article on browser internals and request flow through HTTP protocol. A MUST-READ for any web developer.
Accept
Accept-CH
Accept-CH-Lifetime
Accept-Charset
Accept-Encoding
Accept-Language
Accept-Patch
Accept-Ranges
Access-Control-Allow-Credentials
Access-Control-Allow-Headers
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Access-Control-Expose-Headers
Access-Control-Max-Age
Access-Control-Request-Headers
Access-Control-Request-Method
Age
Allow
Alt-Svc
Authorization
Cache-Control
Clear-Site-Data
Connection
Content-Disposition
Content-Encoding
Content-Language
Content-Length
Content-Location
Content-Range
Content-Security-Policy
Content-Security-Policy-Report-Only
Content-Type
Cookie
Cookie2
Cross-Origin-Embedder-Policy
Cross-Origin-Opener-Policy
Cross-Origin-Resource-Policy
DNT
DPR
Date
Device-Memory
Digest
ETag
Early-Data
Expect
Expect-CT
Expires
Feature-Policy
Forwarded
From
Host
If-Match
If-Modified-Since
If-None-Match
If-Range
If-Unmodified-Since
索引
Keep-Alive
Large-Allocation
Last-Modified
Link
Location
NEL
Origin
Pragma
Proxy-Authenticate
Proxy-Authorization
Public-Key-Pins
Public-Key-Pins-Report-Only
Range
Referer
Referrer-Policy
Retry-After
Save-Data
Sec-Fetch-Dest
Sec-Fetch-Mode
Sec-Fetch-Site
Sec-Fetch-User
Sec-WebSocket-Accept
Server
Server-Timing
Set-Cookie
Set-Cookie2
SourceMap
Strict-Transport-Security
TE
Timing-Allow-Origin
Tk
Trailer
Transfer-Encoding
Upgrade-Insecure-Requests
User-Agent
Vary
Via
WWW-Authenticate
Want-Digest
警告
X-Content-Type-Options
X-DNS-Prefetch-Control
X-Forwarded-For
X-Forwarded-Host
X-Forwarded-Proto
X-Frame-Options
X-XSS-Protection
100 Continue
101 Switching Protocols
103 Early Hints
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
307 Temporary Redirect
308 Permanent Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Payload Too Large
414 URI Too Long
415 Unsupported Media Type
416 Range Not Satisfiable
417 Expectation Failed
418 I'm a teapot
422 Unprocessable Entity
425 Too Early
426 Upgrade Required
428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
451 Unavailable For Legal Reasons
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 Loop Detected
510 Not Extended
511 Network Authentication Required
CSP: base-uri
CSP: block-all-mixed-content
CSP: child-src
CSP: connect-src
CSP: default-src
CSP: font-src
CSP: form-action
CSP: frame-ancestors
CSP: frame-src
CSP: img-src
CSP: manifest-src
CSP: media-src
CSP: navigate-to
CSP: object-src
CSP: plugin-types
CSP: prefetch-src
CSP: referrer
CSP: report-to
CSP: report-uri
CSP: require-sri-for
CSP: sandbox
CSP: script-src
CSP: script-src-attr
CSP: script-src-elem
CSP: style-src
CSP: style-src-attr
CSP: style-src-elem
CSP: trusted-types
CSP: upgrade-insecure-requests
CSP: worker-src