My friend said “Look, the HTTP response from Goolge is strange!”.
Google’s Web site responds:
HTTP/1.1 200 OK
Server: GWS/2.0
Date: Tue, 21 May 2002 12:34:56 GMT
Transfer-Encoding: chunked
Content-Encoding: gzip
Content-Type: text/html
Cache-control: private
Set-Cookie: PREF=ID=58c005a7065c0996:TM=1021283456:LM=1021283456:S=OLJcXi3RhSE;
domain=.google.com; path=/; expires=Sun, 17-Jan-2038 19:14:07 GMT
(Web content compressed with gzip)
I told him “Have you experience the web page slow? then try to use HTTP compression”.
Of interest in this response is that the Web content is of a format that cannot be printed, binary. Because my browser specified in its request that it accepts gzip (GNU zip) encoding, Google chose to encode the response with gzip. This is a popular compression algorithm that allows for a quicker transfer due to the smaller size of the HTTP response. Again this is very common skill but it’s useful.
Reference:
1. Using HTTP Compression
2. HTTP Compression Speeds up the Web
3. Compress data streams in Java with GZIP and Zip





