Introduction
Web Programming Course
SUT • Fall 2019
Outline
Course Information
History of the Internet
-
The HTTP Protocol
HTTP Requests
HTTP Responses
Summary
Course Information
Contents
- HTML/CSS
- JavaScript
- Data Storage
- Server Interaction
- Python
- Web Architectures
- Django
- Advanced Topics
Grades
Final Exam | 3 points |
Midterm Exam | 3 points |
Quizzes/Take Homes | 2 points |
Home work | 4 points |
Project | 8 points |
Resources
- Course Website
- Syllabus
- Assignments
- Resources
-
Quera
- Discussions
- Announcements
Tutorials
- Head-TA
- Ali Asgari
- Class Session
- Sat-Mon 9:00 - 10:30 AM
- Office Hour
- Sat-Mon 9:00 - 10:30 AM
- Tutorial Session
- ?
- Midterm Exam
- 30 Aban 1398
History of the Internet
Origins of the Internet
- The first ARPANET link was established between UCLA and Stanford Research Institute at 22:30 October 29, 1969
"Do you see the L?“
"Yes, we see the L," came the response.
We typed the O, and we asked, "Do you see the O.“
"Yes, we see the O.“
Then we typed the G, and the system crashed ...
Origins of the Internet
- 1972: Email program was modified for use on
ARPANET - 1973: First international connections to ARPANET
(England and Norway) - 1973: ARPA study shows email composing 75% of all ARPANET traffic
- 1978: Possibly the first commercial spam message is sent on 1 May by a DEC marketer advertising an upcoming presentation of its new DECSYSTEM-20 computers
- 1979: USENET (Newsgroups)
established
Origins of the Internet
- 1984: Domain Name System (DNS) introduced
- 1985: File Transfer Protocol (FTP) introduced
- 1997: Number of hosts breaks 10,000
- 1990: Tim Berners-Lee (CERN) invents HTTP and
implements server and browser - 1993: NCSA Mosaic takes the Internet by storm
- 1995: Sun launches Java (including applets)
- 1995: Netscape introduces LiveScript (JavaScript)
- 1996: Beginning of Browser Wars (Mosaic vs.
Netscape then later Netscape vs. Microsoft) - 1998: Google search was launched
Origins of the Internet
- 2001: Wikipedia
- 2002: Weblogs (blogs) become hip
- 2004: Facebook
- 2006: Twitter microblogging
- 2008: DropBox
- 2009: Google Docs
- 2013: Netflix and YouTube account for over 50% of Internet traffic measured by bytes
Internet Users
Internet Hosts
Popular Browsers
- Most popular web browsers (Aug. 2018)
- Internet Explorer: 7.01%
- Firefox: 10.96%
- Chrome: 67.64%
- Safari: 5.13%
- Most widely-used Internet protocol: HTTP
- Highest bandwidth consumption: Peer-to-peer
- file sharing protocols
The Hypertext Transfer
Protocol
HTTP Protocol Summary
Uniform Resource Locator
- URL (Uniform Resource Locator)
- A Subset of Uniform Resource Identifiers (URIs)
- Format:
- protocol://host:port/path?query#frag
- Examples:
- http://ce.sharif.edu/courses/92-93/1/
- https://www.google.com/?q=test
History of HTTP
-
HTTP 0.9: The One-Line Protocol (1991)
-
Client request is a single ASCII character string.
-
Client request is terminated by a carriage return (CRLF).
-
Server response is an ASCII character stream.
-
Server response is a hypertext markup language (HTML).
-
Connection is terminated after the document transfer is complete.
-
$> telnet google.com 80
Connected to 74.125.xxx.xxx
GET /about/
(hypertext response)
(connection closed)
Main HTTP Request Types
HTTP Method | Description |
---|---|
GET | Retrieve a resource |
HEAD | Same as GET, but only retrieve HTTP header |
PUT | Put information on the server |
POST | Send information to the serve |
OPTIONS | Get information about the server |
History of HTTP
-
HTTP 1.0: Rapid Growth and Informational RFC (1996)
-
Request may consist of multiple newline separated header fields.
-
Response object is prefixed with a response status line.
-
Response object has its own set of newline separated header fields.
-
Response object is not limited to hypertext.
-
The connection between server and client is closed after every request.
-
History of HTTP
$> telnet website.org 80
Connected to xxx.xxx.xxx.xxx
GET /rfc/rfc1945.txt HTTP/1.0
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Accept: */*
HTTP/1.0 200 OK
Content-Type: text/plain
Content-Length: 137582
Expires: Thu, 01 Dec 1997 16:00:00 GMT
Last-Modified: Wed, 1 May 1996 12:45:26 GMT
Server: Apache 0.84
(plain-text response)
(connection closed)
Status codes
Status code | Description |
---|---|
1XX | Informational |
2XX | Successful |
3XX | Redirection |
4XX | Client Error |
5XX | Server Error |
History of HTTP
-
HTTP/1.1: Internet Standard (1997)
- changed the semantics of the HTTP protocol to use connection keep alive by default
- content, encoding, character set, and even language negotiation, transfer encoding, caching directives, client cookies
$> telnet website.org 80
Connected to xxx.xxx.xxx.xxx
GET /index.html HTTP/1.1
Host: website.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)... (snip)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __qca=P0-800083390... (snip)
History of HTTP
-
HTTP/2: Improving Transport Performance (2015)
- Data compression of HTTP headers
- HTTP/2 Server Push
- Pipelining of requests
- Fixing the head-of-line blocking problem in HTTP 1.x.
- Multiplexing multiple requests over a single TCP connection
summary
- The basic HTTP transaction is a request from the client followed by a reply from the server
- Both requests and replies have a header followed by an optional body
- 200 indicates a success
- 4xx indicates an error
Title Text
Introduction
By Behnam Hatami
Introduction
Introduction / Web Programming Course @ SUT, Fall 2018
- 1,575