Content deleted Content added
Artoria2e5 (talk | contribs) |
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
||
Line 10:
1. The [[web client]] advertises which compression schemes it supports by including a list of tokens in the [[HTTP request]]. For ''Content-Encoding'', the list in a field called ''Accept-Encoding''; for ''Transfer-Encoding'', the field is called ''TE''.
<
GET /encrypted-area HTTP/1.1
Host: www.example.com
Accept-Encoding: gzip, deflate
</syntaxhighlight>
2. If the server supports one or more compression schemes, the outgoing data may be compressed by one or more methods supported by both parties. If this is the case, the server will add a ''Content-Encoding'' or ''Transfer-Encoding'' field in the HTTP response with the used schemes, separated by commas.
<
HTTP/1.1 200 OK
Date: mon, 26 June 2016 22:38:34 GMT
Line 27:
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
</syntaxhighlight>
The [[web server]] is by no means obligated to use any compression method – this depends on the internal settings of the web server and also may depend on the internal architecture of the website in question.
|