SiteCozy

  • My account

The HTTP date headers exchange when retrieving a web page

2019-02-21

When a client sends an HTTP request to a server for an HTML page, It receives a header text. In this text, the receiver can read a message. To illustrate this, we will use the command line curl which can be downloaded and installed on MS Windows. Curl is installed by default on MacOS and can be installed on Linux. The command “curl -v http://www.google.com -I” sends a request to www.google.com to get the HTTP headers of http://www.google.com. In the screenshot below, you can see the request lines starting with a “>” and the response lines “<” sent by www.google.com. The line “HTTP/1.1” 200 OK is important to us. HTTP/1.1 is the protocol and “200 OK” is the HTTP response code.

$ curl -v http://www.google.com -I
* Rebuilt URL to: http://www.google.com/
* Trying 2a00:1450:4007:817::2004...
* TCP_NODELAY set
* Connected to www.google.com (2a00:1450:4007:817::2004) port 80 (#0)
> HEAD / HTTP/1.1
> Host: www.google.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Thu, 21 Feb 2019 10:12:04 GMT
Date: Thu, 21 Feb 2019 10:12:04 GMT
< Expires: -1
Expires: -1
< Cache-Control: private, max-age=0
Cache-Control: private, max-age=0
< Content-Type: text/html; charset=ISO-8859-1
Content-Type: text/html; charset=ISO-8859-1
< P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< Server: gws
Server: gws
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
< Set-Cookie: 1P_JAR=2019-02-21-10; expires=Sat, 23-Mar-2019 10:12:04 GMT; path=/; domain=.google.com
Set-Cookie: 1P_JAR=2019-02-21-10; expires=Sat, 23-Mar-2019 10:12:04 GMT; path=/; domain=.google.com
< Set-Cookie: NID=160=XKmPk7wl3KWbsZlccajHsjzTGHs529QVAUVwnAO5JF4UeqcXgImMZWckUA_aw77UR0SCZEae_UAe4E4E4rO6kelryegY
qy6g5p2zt1S2sIoNZL6dCdhUO-ANpPe_JffvhmjTxa2b_lTnJN8Y1C66BD6mezaFlnolemiaS23dyo;
expires=Fri, 23-Aug-2019 10:12:04 GMT; path=/; domain=.google.com; HttpOnly
Set-Cookie: NID=160=XKmPk7wl3KWbsZlccajHsjzTGHs529QVAUVwnAO5JF4UeqcXgImMZWckUA_aw77UR0SCZEae_UAe4E4E4rO6kelryegY
qy6g5p2zt1S2sIoNZL6dCdhUO-ANpPe_JffvhmjTxa2b_lTnJN8Y1C66BD6mezaFlnolemiaS23dyo;
expires=Fri, 23-Aug-2019 10:12:04 GMT; path=/; domain=.google.com; HttpOnly
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Accept-Ranges: none
Accept-Ranges: none
< Vary: Accept-Encoding
Vary: Accept-Encoding

This server response is sent when a resource was found and delivered to a client like a computer or a mobile. This is a normal situation. When you visit a web page on the internet, your browser receives many
200 OK HTTP status codes because there is one HTTP code response per resource. For instance, if you send a
request to get www.google.com , the browser will get a first 200 response for the web page and subsequent HTTP responses for every image, script, IFRAME found inside the HTML code.
In Google Chrome, you can visualize all those HTTP response codes under the column “status” in the section
“network” of developer tools panel.

Related Posts:

  • Can switching your website to HTTP/2 be a problem for google indexing?
  • Reasons for getting a 500 internal server error message
  • How does a 301 redirect work?
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018