12.2 · HTTP versions, TLS, App Transport Security and certificate pinning
Most networking bugs are above the wire, but the wire explains the performance and security questions: how many connections, how fast to first byte, and who you are really talking to.
Mental model. HTTP versions decide how requests share a connection; TLS decides who you are talking to. Neither is something your app code usually touches, but both decide what is possible.
The protocols
HTTP/1.1, HTTP/2 and HTTP/3, and what changes for a client.
- How do HTTP/1.1, HTTP/2 and HTTP/3 differ, and what does that mean for an iOS client?
HTTP/1.1 sends one request at a time per connection, so a page of many resources opens several connections in parallel (about six per host) and suffers…
Trust
TLS, App Transport Security and certificate pinning.
- How do TLS and App Transport Security protect a request, and what is certificate pinning, and why is it fraught?
TLS gives a connection confidentiality, integrity and authentication of the server: the server presents a certificate chain, and the client verifies that it…
More in Networking
- 12.1 · Sessions, configurations, tasks, delegates and background transfers
- 12.3 · Pagination, caching and conditional requests, and authentication refresh
- 12.4 · WebSockets, multipart and large transfers, and network path monitoring
- 12.5 · Retries, backoff, idempotency and cancellation
- 12.6 · REST, GraphQL and gRPC, and building a client platform
- 12.7 · Image loading pipelines: download, decode, downsample, cache
- 12.8 · Building URLs, reading headers, classifying errors and timeouts
- 12.9 · Single-flight token refresh, streaming lines, multipart bodies and request signing
- 12.10 · Network.framework, background sessions, delegates versus async, diagnosing and measuring