SlideShare a Scribd company logo
TCP/IP
clkr.com
http://www.example.com/index.html
http://www.example.com/index.html
http://www.example.com/index.html
http://www.example.com/index.html
http://www.example.com/index.html
http://www.example.com/index.html
http://www.example.com/index.html
HTTP
GET / HTTP/1.1
Host: www.example.com
...
GET /index.html HTTP/1.1
Host: www.example.com
...
GET / HTTP/1.1
Host: www.example.com
...
HTTP/1.1 200 OK
Content-Type: text/html
...
GET / HTTP/1.1
Host: harvard.edu
...
GET / HTTP/1.1
Host: www.harvard.edu
...
HTTP/1.1 301 Moved Permanently
Location: https://www.harvard.edu/
…
HTTP/1.1 404 Not Found
Content-Type: text/html
...
GET / HTTP/2
Host: www.example.com
...
HTTP/2 200
Content-Type: text/html
...
● 200 OK
● 301 Moved Permanently
● 302 Found
● 304 Not Modified
● 401 Unauthorized
● 403 Forbidden
● 404 Not Found
● 418 I'm a Teapot
● 500 Internal Server Error
● ...
GET / HTTP/1.1
Host: safetyschool.org
...
GET / HTTP/1.1
Host: www.harvardsucks.org
...
GET /search?q=cats HTTP/1.1
Host: www.google.com
...
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
CSS
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<style>
</style>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link href="styles.css" rel="stylesheet">
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
validator.w3.org
JavaScript
C
JavaScript
int counter = 0;
let counter = 0;
counter = counter + 1;
counter += 1;
counter++;
if (x < y)
{
}
if (x < y)
{
}
else
{
}
if (x < y)
{
}
else if (x > y)
{
}
else
{
}
while (true)
{
}
for (int i = 0; i < 50; i++)
{
}
for (let i = 0; i < 50; i++)
{
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
hello, title
hello, body
<!DOCTYPE html>
<html lang="en">
<head>
<script>
</script>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<script src="scripts.js"></script>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
<script>
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
<script src="scripts.js"></script>
</body>
</html>
● blur
● change
● click
● drag
● focus
● keypress
● load
● mousedown
● mouseover
● mouseup
● submit
● touchmove
● unload
● ...
●
This is CS50

More Related Content

PPTX
HTTP HOST header attacks
PDF
DEF CON 27- ALBINOWAX - http desync attacks
PPTX
Browsers_SameOriginPolicy_CORS_ContentSecurityPolicy
PDF
Cross site calls with javascript - the right way with CORS
PPT
Same origin policy
PPTX
Web Security - Cookies, Domains and CORS
PPTX
Misconfigured CORS, Why being secure isn't getting easier. AppSec USA 2016
PPTX
Http caching basics
HTTP HOST header attacks
DEF CON 27- ALBINOWAX - http desync attacks
Browsers_SameOriginPolicy_CORS_ContentSecurityPolicy
Cross site calls with javascript - the right way with CORS
Same origin policy
Web Security - Cookies, Domains and CORS
Misconfigured CORS, Why being secure isn't getting easier. AppSec USA 2016
Http caching basics

What's hot (6)

PDF
Running PHP on a Java container
PPTX
The Functional Web
PPT
Realtime Communication Techniques with PHP
PDF
Cross-domain requests with CORS
PDF
How web crawlers work
PPT
Web::Scraper
Running PHP on a Java container
The Functional Web
Realtime Communication Techniques with PHP
Cross-domain requests with CORS
How web crawlers work
Web::Scraper
Ad

Similar to CS50 Lecture5 (20)

PPTX
Http request smuggling
PDF
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
PPTX
WWW and HTTP
PDF
Caching on the Edge
PPTX
Interactive web. O rly?
PDF
Just curl it!
PPTX
Attacking thru HTTP Host header
PPTX
Web Cache Poisoning
PDF
HTTP and Your Angry Dog
PPTX
01. http basics v27
PDF
Hidden Gems in HTTP
PDF
HTTP Basics Demo
PDF
HTTP Caching in Web Application
PDF
Making the Most of HTTP In Your Apps
PPT
Under the Covers with the Web
PDF
curl better
PDF
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
PDF
5. HTTP и приятели
PDF
Revisiting HTTP/2
PDF
Ethernet Shield
Http request smuggling
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
WWW and HTTP
Caching on the Edge
Interactive web. O rly?
Just curl it!
Attacking thru HTTP Host header
Web Cache Poisoning
HTTP and Your Angry Dog
01. http basics v27
Hidden Gems in HTTP
HTTP Basics Demo
HTTP Caching in Web Application
Making the Most of HTTP In Your Apps
Under the Covers with the Web
curl better
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
5. HTTP и приятели
Revisiting HTTP/2
Ethernet Shield
Ad

More from 昀 李 (6)

PDF
TTA Bootcamp
PDF
為自己學 Git
PDF
CS50 Lecture4
PDF
CS50 Lecture3
PDF
CS50 Lecture2
PDF
CS50 Lecture1
TTA Bootcamp
為自己學 Git
CS50 Lecture4
CS50 Lecture3
CS50 Lecture2
CS50 Lecture1

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
history of c programming in notes for students .pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
assetexplorer- product-overview - presentation
PDF
Digital Strategies for Manufacturing Companies
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
System and Network Administraation Chapter 3
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms I-SECS-1021-03
CHAPTER 2 - PM Management and IT Context
history of c programming in notes for students .pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms II-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Designing Intelligence for the Shop Floor.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
assetexplorer- product-overview - presentation
Digital Strategies for Manufacturing Companies
Computer Software and OS of computer science of grade 11.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Odoo Companies in India – Driving Business Transformation.pdf
System and Network Administraation Chapter 3
medical staffing services at VALiNTRY
Design an Analysis of Algorithms I-SECS-1021-03

CS50 Lecture5