1. Client and Server

📌 Example:

When you type https://example.com in your browser:

2. Request-Response Cycle

  1. DNS Resolution → Your system finds the server’s IP address for example.com.
  2. TCP Connection → Client and server establish a connection (using TCP/IP).
  3. TLS/SSL Handshake (if HTTPS) → Secure encryption is set up.
  4. HTTP Request → Browser sends a request (GET/POST/PUT/DELETE).
  5. Server Processing → Server checks database, runs backend code (PHP, Node.js, Python, etc.).
  6. HTTP Response → Server sends data back (status code + content).
  7. Rendering → Browser displays the page using HTML, CSS, JS.