HTTP and HTTPS Basics

View saved

Request and respond

HTTP is the application protocol for the web. A client sends a request (method, path, headers) and the server returns a status code plus a body such as HTML, JSON, or an image.

Read status codes lightly

  • 200 success
  • 301/302 redirect
  • 404 not found
  • 500 server error

Prefer HTTPS

HTTPS is HTTP over an encrypted TLS connection, usually on port 443. Encryption protects privacy on shared networks, and certificates help the browser verify it is talking to the expected server.

See the URL pieces

In https://www.example.com/path, https chooses the scheme, the host name is resolved by DNS, and /path tells the server which resource to return.

Comments

One comment per signed-in account. Comments are saved with this page’s URL.