HTTP and Me

HTTP and Me

An introduction to HTTP and how it drives the modern web. Deck was created for and targeted at a lunch and learn for developers, designers, and non-creatives at Blackstone Media (http://www.blackstonemedia.com/) and StarkNine (http://www.starknine.com/) in Louisville, KY.

Screencast: http://youtu.be/uCkptOF75II

033132c341296d7f5e5b41e871178418?s=128

Shane Logsdon

August 11, 2014
Tweet

Transcript

  1. 10.
  2. 11.

    GET / HTTP/1.1 Host: duckduckgo.com Content-Type: text/html Cache-Control: no-cache HTTP/1.1

    200 OK Server: nginx Date: Thu, 24 Jul 2014 04:21:31 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 9991 Connection: keep-alive ETag: "53d05a42-2707" Expires: Thu, 24 Jul 2014 04:21:32 GMT Cache-Control: max-age=1 Strict-Transport-Security: max-age=31536000 Accept-Ranges: bytes <!DOCTYPE html> <html class="no-js" lang="en_US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8;charset=utf-8"> …
  3. 12.

    GET / HTTP/1.1 Host: duckduckgo.com Content-Type: text/html Cache-Control: no-cache HTTP/1.1

    200 OK Server: nginx Date: Thu, 24 Jul 2014 04:21:31 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 9991 Connection: keep-alive ETag: "53d05a42-2707" Expires: Thu, 24 Jul 2014 04:21:32 GMT Cache-Control: max-age=1 Strict-Transport-Security: max-age=31536000 Accept-Ranges: bytes <!DOCTYPE html> <html class="no-js" lang="en_US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8;charset=utf-8"> …
  4. 14.

    A Request Method is… the primary source of request semantics;

    it indicates the purpose for which the client has made this request and what is expected by the client as a successful result.
  5. 15.

    3 & 5 Make Many GET POST HEAD HTTP/1.0 OPTIONS

    PUT DELETE TRACE CONNECT HTTP/1.1
  6. 16.

    GET / HTTP/1.1 Host: duckduckgo.com Content-Type: text/html Cache-Control: no-cache HTTP/1.1

    200 OK Server: nginx Date: Thu, 24 Jul 2014 04:21:31 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 9991 Connection: keep-alive ETag: "53d05a42-2707" Expires: Thu, 24 Jul 2014 04:21:32 GMT Cache-Control: max-age=1 Strict-Transport-Security: max-age=31536000 Accept-Ranges: bytes <!DOCTYPE html> <html class="no-js" lang="en_US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8;charset=utf-8"> …
  7. 19.

    Reasons for Headers Provide more information about the request/response context

    Make the request conditional based on the target resource state Suggest preferred formats for the request/ response Supply authentication credentials Modify the expected request processing
  8. 20.

    GET / HTTP/1.1 Host: duckduckgo.com Content-Type: text/html Cache-Control: no-cache HTTP/1.1

    200 OK Server: nginx Date: Thu, 24 Jul 2014 04:21:31 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 9991 Connection: keep-alive ETag: "53d05a42-2707" Expires: Thu, 24 Jul 2014 04:21:32 GMT Cache-Control: max-age=1 Strict-Transport-Security: max-age=31536000 Accept-Ranges: bytes <!DOCTYPE html> <html class="no-js" lang="en_US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8;charset=utf-8"> …
  9. 23.

    GET / HTTP/1.1 Host: duckduckgo.com Content-Type: text/html Cache-Control: no-cache HTTP/1.1

    200 OK Server: nginx Date: Thu, 24 Jul 2014 04:21:31 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 9991 Connection: keep-alive ETag: "53d05a42-2707" Expires: Thu, 24 Jul 2014 04:21:32 GMT Cache-Control: max-age=1 Strict-Transport-Security: max-age=31536000 Accept-Ranges: bytes <!DOCTYPE html> <html class="no-js" lang="en_US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8;charset=utf-8"> …
  10. 24.

    GET / HTTP/1.1 Host: www.duckduckgo.com Content-Type: text/html Cache-Control: no-cache HTTP/1.1

    301 Moved Permanently Server: nginx Date: Thu, 24 Jul 2014 04:30:31 GMT Content-Type: text/html Content-Length: 178 Connection: keep-alive Location: https://duckduckgo.com/ Expires: Thu, 24 Jul 2014 04:30:32 GMT Cache-Control: max-age=1 <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx</center> </body> </html>
  11. 26.

    Wrapping Up Requests are made to servers. Responses are sent

    in return to clients. Methods note “type” of request Status codes note “type” of response Headers modify request/response All defined in HTTP specifications