====== Curl - Check HTTP Headers ======
curl -Ls -o /dev/null -D - sharewiz.net
* -L Follow redirects
* -s Silent mode. Don't show progress meter or error messages.
* -D Write the protocol headers to the specified file.
returns:
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 01 Jul 2016 23:24:21 GMT
Content-Type: text/html
Content-Length: 28277
Last-Modified: Thu, 30 Jun 2016 23:16:03 GMT
Connection: keep-alive
ETag: "5775a833-6e75"
Accept-Ranges: bytes
----
===== Alternative method =====
curl --head http://www.sharewiz.net/
returns:
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 01 Jul 2016 23:47:49 GMT
Content-Type: text/html
Content-Length: 28277
Last-Modified: Thu, 30 Jun 2016 23:16:03 GMT
Connection: keep-alive
ETag: "5775a833-6e75"
Accept-Ranges: bytes
----
===== Check any specific resource =====
curl --head http://www.google.com/logo_plain.jpg
----
===== Dump document headers to a file =====
curl --dump-header headers.txt http://www.google.com/