SlideShare a Scribd company logo
How Web Pages Work
and other ghost stories
Disclaimer
no math
no programming
no problem
How do computers talk?
How do computers talk?
How do computers talk?
How do computers talk?
How do computers talk?
How do computers talk?
Great, so how do they become friends?
Domain Name System
DNS translates domains into something computers understand
google.com means nothing
1.1.1.1 means something
Who do they talk to?
Who do they talk to?
IP address gets traffic to the computer
Ports get the traffic to the application
ex. 1.1.1.1:80
ex. fakewebpage.com:8080
What do they talk about?
Hyper Text Transfer Protocol (HTTP)
Transfers HTML (Hyper Text Markup Language)
Usually on port 80
HTTP Format
Verb and info
Headers, one per line
[blank line]
Optional body
HTTP Verbs
GET
POST
The other guys: PUT / PATCH / DELETE / HEAD
HTTP Headers
Host - name of the website we’re talking to
User agent - browser version
Cache - remember this, not gonna answer again
Cookies - magic
HTTP GET Requests
GET / HTTP/1.1
Host: oneis.us
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) Firefox/44.0
Accept: text/html,application/xml
Accept-Language: en-US,en,es-MX
Accept-Encoding: gzip, deflate
Cookie: _ga=GA1.2.229765080.1436819046
Request sent!
Server gets request
Forwards it to the web server program
Web server gets the file requested
Sends response with requested file contents
HTTP Responses
HTTP/1.1 200 OK
Content-Length: 1241
Date: Mon, 01 Feb 2016 17:54:16 GMT
Content-Type: text/html;charset=utf-8
Server: WEBrick/1.3.1 (Ruby/1.8.7/2014-01-28)
[HTML body that’s 1241 characters long]
HTML (and CSS and JS and images and…)
HTTP Get Requests
GET /users.php?page=2 HTTP/1.1
Host: oneis.us
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) Firefox/44.0
Accept: text/html,application/xml
Accept-Language: en-US,en,es-MX
Accept-Encoding: gzip, deflate
Cookie: _ga=GA1.2.229765080.1436819046
HTTP Responses
HTTP/1.1 404 Not Found
Content-Length: 28
Date: Mon, 01 Feb 2016 17:58:02 GMT
Content-Type: text/html;charset=utf-8
Server: WEBrick/1.3.1 (Ruby/1.8.7/2014-01-28)
Sorry, that code is unknown.
HTTP Status Codes
1xx - info
2xx - success
3xx - redirect
4xx - client error
5xx - server error
HTTP Post Request
HTTP Post Request
POST /api/set HTTP/1.1
Host: oneis.us
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) Firefox/44.0
Accept: text/html,application/xml
Accept-Language: en-US,en,es-MX
api_key=lolidunno&submit=submit
HTTP Responses
HTTP/1.1 302 Found
Location: https://oneis.us/goaway
Date: Mon, 01 Feb 2016 18:02:39 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.7/2014-01-28)
So what the hell are JS and PHP?
PHP runs “server side” (read: on the server)
Never sent to you, generates the HTML
JS runs “client side” (read: in your browser)
Included in HTTP response, manipulates HTML
JavaScript included in response
TL;DR
DNS Lookup
Sends request
Server gets reads or runs requested file
Server sends response back
Browser draws response from HTML
Browser requests any other needed files, runs JS
TL;DR
What didn’t we cover?
HTTPS
AJAX
Cookies
Caching
More learnins
You can watch this stuff IRL in your browser’s dev tools
Wikipedia’s HTTP page has some examples

More Related Content

What's hot

Javascript cross domain communication
Javascript cross domain communicationJavascript cross domain communication
Javascript cross domain communication
ChenKuo Chen
 
An Introduction To World Wide Web
An Introduction To World Wide WebAn Introduction To World Wide Web
An Introduction To World Wide Web
Abhishek Kharbanda
 
File formats
File formatsFile formats
File formats
Kopi Maheswaran
 
05 File Handling Upload Mysql
05 File Handling Upload Mysql05 File Handling Upload Mysql
05 File Handling Upload Mysql
Geshan Manandhar
 
PHP TUTORIAL
PHP TUTORIALPHP TUTORIAL
PHP TUTORIAL
SURBHI SAROHA
 
4 Basic PHP
4 Basic PHP4 Basic PHP
4 Basic PHP
Jalpesh Vasa
 
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technologyvikram singh
 

What's hot (8)

Javascript cross domain communication
Javascript cross domain communicationJavascript cross domain communication
Javascript cross domain communication
 
An Introduction To World Wide Web
An Introduction To World Wide WebAn Introduction To World Wide Web
An Introduction To World Wide Web
 
File formats
File formatsFile formats
File formats
 
05 File Handling Upload Mysql
05 File Handling Upload Mysql05 File Handling Upload Mysql
05 File Handling Upload Mysql
 
PHP TUTORIAL
PHP TUTORIALPHP TUTORIAL
PHP TUTORIAL
 
4 Basic PHP
4 Basic PHP4 Basic PHP
4 Basic PHP
 
introduction to web technology
introduction to web technologyintroduction to web technology
introduction to web technology
 
slidesharenew1
slidesharenew1slidesharenew1
slidesharenew1
 

Similar to How Web Pages Work

HTTP
HTTPHTTP
World Wide Web (WWW) Technology
World Wide Web (WWW) TechnologyWorld Wide Web (WWW) Technology
World Wide Web (WWW) Technology
Kamyar Lajani
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
hussulinux
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
Trevor Lohrbeer
 
HTTP: the Other ESB
HTTP: the Other ESBHTTP: the Other ESB
HTTP: the Other ESB
Ryan Riley
 
Introduction to the web
Introduction to the webIntroduction to the web
Introduction to the web
SAMIR BHOGAYTA
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
NYversity
 
Introduction to HTTP
Introduction to HTTPIntroduction to HTTP
Introduction to HTTP
Seble Nigussie
 
20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basic
MksYi
 
Webtechnologies
Webtechnologies Webtechnologies
Webtechnologies
-jyothish kumar sirigidi
 
Web Fundamentals
Web FundamentalsWeb Fundamentals
Web Fundamentals
arunv
 
Rawnet Lightning talk 'How the Internet Works'
Rawnet Lightning talk   'How the Internet Works'Rawnet Lightning talk   'How the Internet Works'
Rawnet Lightning talk 'How the Internet Works'
Rawnet
 
introduction_to_web_technology.pdf
introduction_to_web_technology.pdfintroduction_to_web_technology.pdf
introduction_to_web_technology.pdf
VishwanathBurkpalli
 
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
Dongwook Lee
 
Node js oc meetup 2 socket io intro
Node js oc meetup 2 socket io introNode js oc meetup 2 socket io intro
Node js oc meetup 2 socket io intro
eddify
 
HTTP Basic - PHP
HTTP Basic - PHPHTTP Basic - PHP
HTTP Basic - PHP
Sulaeman .
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
guest8899ec02
 

Similar to How Web Pages Work (20)

HTTP
HTTPHTTP
HTTP
 
World Wide Web (WWW) Technology
World Wide Web (WWW) TechnologyWorld Wide Web (WWW) Technology
World Wide Web (WWW) Technology
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
 
HTTP: the Other ESB
HTTP: the Other ESBHTTP: the Other ESB
HTTP: the Other ESB
 
Introduction to the web
Introduction to the webIntroduction to the web
Introduction to the web
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
Starting With Php
Starting With PhpStarting With Php
Starting With Php
 
Spider Course Day 1
Spider Course Day 1Spider Course Day 1
Spider Course Day 1
 
Introduction to HTTP
Introduction to HTTPIntroduction to HTTP
Introduction to HTTP
 
20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basic
 
Webtechnologies
Webtechnologies Webtechnologies
Webtechnologies
 
Web Fundamentals
Web FundamentalsWeb Fundamentals
Web Fundamentals
 
Rawnet Lightning talk 'How the Internet Works'
Rawnet Lightning talk   'How the Internet Works'Rawnet Lightning talk   'How the Internet Works'
Rawnet Lightning talk 'How the Internet Works'
 
introduction_to_web_technology.pdf
introduction_to_web_technology.pdfintroduction_to_web_technology.pdf
introduction_to_web_technology.pdf
 
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
 
Node js oc meetup 2 socket io intro
Node js oc meetup 2 socket io introNode js oc meetup 2 socket io intro
Node js oc meetup 2 socket io intro
 
HTTP Basic - PHP
HTTP Basic - PHPHTTP Basic - PHP
HTTP Basic - PHP
 
Howthe internet
Howthe internetHowthe internet
Howthe internet
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
 

Recently uploaded

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 

How Web Pages Work

  • 1. How Web Pages Work and other ghost stories
  • 9. Great, so how do they become friends? Domain Name System DNS translates domains into something computers understand google.com means nothing 1.1.1.1 means something
  • 10. Who do they talk to?
  • 11. Who do they talk to? IP address gets traffic to the computer Ports get the traffic to the application ex. 1.1.1.1:80 ex. fakewebpage.com:8080
  • 12. What do they talk about? Hyper Text Transfer Protocol (HTTP) Transfers HTML (Hyper Text Markup Language) Usually on port 80
  • 13. HTTP Format Verb and info Headers, one per line [blank line] Optional body
  • 14. HTTP Verbs GET POST The other guys: PUT / PATCH / DELETE / HEAD
  • 15. HTTP Headers Host - name of the website we’re talking to User agent - browser version Cache - remember this, not gonna answer again Cookies - magic
  • 16. HTTP GET Requests GET / HTTP/1.1 Host: oneis.us User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) Firefox/44.0 Accept: text/html,application/xml Accept-Language: en-US,en,es-MX Accept-Encoding: gzip, deflate Cookie: _ga=GA1.2.229765080.1436819046
  • 17. Request sent! Server gets request Forwards it to the web server program Web server gets the file requested Sends response with requested file contents
  • 18. HTTP Responses HTTP/1.1 200 OK Content-Length: 1241 Date: Mon, 01 Feb 2016 17:54:16 GMT Content-Type: text/html;charset=utf-8 Server: WEBrick/1.3.1 (Ruby/1.8.7/2014-01-28) [HTML body that’s 1241 characters long]
  • 19. HTML (and CSS and JS and images and…)
  • 20. HTTP Get Requests GET /users.php?page=2 HTTP/1.1 Host: oneis.us User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) Firefox/44.0 Accept: text/html,application/xml Accept-Language: en-US,en,es-MX Accept-Encoding: gzip, deflate Cookie: _ga=GA1.2.229765080.1436819046
  • 21. HTTP Responses HTTP/1.1 404 Not Found Content-Length: 28 Date: Mon, 01 Feb 2016 17:58:02 GMT Content-Type: text/html;charset=utf-8 Server: WEBrick/1.3.1 (Ruby/1.8.7/2014-01-28) Sorry, that code is unknown.
  • 22. HTTP Status Codes 1xx - info 2xx - success 3xx - redirect 4xx - client error 5xx - server error
  • 24. HTTP Post Request POST /api/set HTTP/1.1 Host: oneis.us User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) Firefox/44.0 Accept: text/html,application/xml Accept-Language: en-US,en,es-MX api_key=lolidunno&submit=submit
  • 25. HTTP Responses HTTP/1.1 302 Found Location: https://oneis.us/goaway Date: Mon, 01 Feb 2016 18:02:39 GMT Server: WEBrick/1.3.1 (Ruby/1.8.7/2014-01-28)
  • 26. So what the hell are JS and PHP? PHP runs “server side” (read: on the server) Never sent to you, generates the HTML JS runs “client side” (read: in your browser) Included in HTTP response, manipulates HTML
  • 28. TL;DR DNS Lookup Sends request Server gets reads or runs requested file Server sends response back Browser draws response from HTML Browser requests any other needed files, runs JS
  • 29. TL;DR
  • 30. What didn’t we cover? HTTPS AJAX Cookies Caching
  • 31. More learnins You can watch this stuff IRL in your browser’s dev tools Wikipedia’s HTTP page has some examples