---
tags: Web, slide
---
# HTTP
* Technical overview
* History
* HTTP session
* Request message
---
### What is HTTP protocol
* Hypertext Transfer Protocol
* An application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems.
* Foundation of World Wide Web, where hypertext documents are **easily** accessible.

---
### History
* Initiated by Tim Berners-Lee at CERN in 1989.
* HTTP/1 was first documented in 1997
* HTTP/2 is more efficient on expression, publised in 2015, and used by 45% of web site
---

---
## Protocol session
* TCP (transmission control protocol), typically port 80
* Persistent connection
* HTTP/1.1 introduce keep-alive-mechanism.
* the connection can be reused; it would not be closed after a single requrest/response pair
* reduce request latency because client does not need to re-negotiate the TCP 3-way-hankshake.
* **Stateless** protocol
* server maintains no information about past client request
* some web applications implements states or server side sessions using HTTP cookies or hidden variables
---
3-way handshake:

---
Persistent connection:


---
## Request method
* GET: get content information.
* HEAD: only metadata, not entire content.
* POST
* PUT
* DELETE
* TRACE
* OPTIONS
* CONNECT
See [Here](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods) for more description.
---
### HTTPS
* 安全超文字傳輸協議 它是一個安全通訊通道
HTTPS是HTTP over SSL/TLS,HTTP是應用層協議,TCP是傳輸層協議,在應用層和傳輸層之間,增加了一個安全套接層SSL/TLS:
* SSL (Secure Socket Layer,安全套接字層)
* TLS (Transport Layer Security,傳輸層安全協議)
* SSL使用40 位關鍵字作為RC4流加密演算法
## More study
{%youtube d8Ib8a3TeN0 %}(HTTP Overview)
---
{%youtube iD2fgC74ZtA %}
---