Overview
This lesson explains how web browsing and internet communication work, featuring insights from Xbox One engineering and Tumblr's founder. It covers HTTP protocols, HTML structure, cookies, and security measures that enable computers to communicate globally.
How Web Browsing Works
- Open a web browser application to access web pages
- Enter a URL (Uniform Resource Locator) in the address bar, such as Tumblr.com
- Browser initiates communication with a server, often thousands of miles away
- Server responds in milliseconds using HTTP protocol
- Communication happens in plain text unless security protocols are enabled
HTTP Communication
- HTTP (HyperText Transfer Protocol) is the language computers use to request documents
- Communication consists primarily of GET and POST requests sent to web servers
- GET request format: GET /login retrieves the HTML code for specified page
- Servers respond by sending back requested HTML and associated files
- Each resource (images, videos) requires separate HTTP request with unique URL
HTTP Request Types
| Request Type | Purpose | Example Use Case |
|---|
| GET | Retrieve documents/pages from server | Loading Tumblr login page: GET /login |
| POST | Send information to server | Submitting login form with email and password |
HTML and Web Pages
- HTML (HyperText Markup Language) tells browsers how to display page content
- Controls text formatting: bold, italic, font size, and alignment
- Manages links between pages and embeds images/videos
- Text content is included directly in HTML code
- Images and videos are separate files requiring individual HTTP requests
- Pages with many images load slower due to multiple requests
Cookies and Session Management
- Cookies are invisible data attached to server responses after login
- Function as ID cards containing unique identifier numbers for users
- Browsers automatically attach cookie ID to subsequent requests to same site
- Enable websites to remember user identity across page refreshes
- Only way websites can maintain user session state
Web Security
- Internet connections are open and shared; data sent in plain text by default
- SSL (Secure Sockets Layer) and TLS (Transport Layer Security) protect communications
- HTTPS protocol ensures HTTP requests are secure from snooping and tampering
- Lock icon in browser address bar indicates active SSL/TLS connection
- Digital certificates prove website identity before establishing secure connection
- Certificate authorities verify website identities and issue trusted certificates
- Browsers warn users if website lacks properly issued digital certificate
Internet Architecture
- DNS and HTTP manage sending and receiving of web content
- TCP/IP and router networks break information into small packets for transport
- Packets consist of binary sequences (1s and 0s) transmitted physically
- Physical transmission occurs through electric wires, fiber optic cables, and wireless networks
- Layered system allows each layer to function independently and reliably
- Multiple layers work together to deliver information at scale