HTTP/HTTPS protocols
This course explains how browsers and servers talk over HTTP and how HTTPS protects that conversation. It covers the request-response model, statelessness, URL parts, and the structure of requests and responses: request line, status line, headers and body. It goes through header categories, status code ranges, TLS encryption, certificates and HSTS. It also covers caching with Cache-Control, ETag and fingerprinting, plus compression and HTTP/2 multiplexing. The last lesson maps these ideas to Rails routes, controllers, CSRF protection and Turbo.
What you'll learn
- ✓The structure of HTTP requests and responses
- ✓Status code categories and common codes
- ✓Content, caching, cookie, security and CORS headers
- ✓How TLS provides encryption, integrity and authentication
- ✓HTTP caching, revalidation and cache busting
- ✓How Rails routes, controllers and Turbo use HTTP
What is HTTP?
Every time you visit a website, submit a form, or load an image, your browser is having a conversation with a server. That conversation follows a strict set of rules called HTTP: HyperText Transfer Protocol.
Read the full lesson free →Curriculum
7 lessonsWhat is HTTP?
Introduces HTTP as a stateless request-response protocol over TCP, with URL anatomy, methods and status codes.
The HTTP request
Breaks a request into request line, headers and body, covering form, JSON and multipart bodies.
The HTTP response
Explains the status line, response headers and body, and how Rails renders, redirects and sets status codes.
HTTP headers in depth
Groups headers by function: content, negotiation, caching, authentication, cookies, security, CORS and custom headers.
HTTPS and TLS
Covers how TLS encrypts HTTP, the handshake, certificates, Let's Encrypt, force_ssl, HSTS and mixed content.
HTTP caching and performance
Describes cache layers, Cache-Control directives, ETag revalidation, fingerprinting, compression, keep-alive and HTTP/2 head-of-line blocking.
HTTP in Rails development
Maps HTTP to Rails routes, params, status symbols, content negotiation, CSRF tokens, Turbo and debugging tools.