Upload
michael-rees
View
917
Download
0
Embed Size (px)
DESCRIPTION
Web Concepts
Citation preview
Dr Michael Rees
School of Information Technology
INFT11/71-132
Web Applications
Web Concepts
Web Applications 2
• Internet is the basic infrastructure
• The Web provides a linked, information structure – web pages
• Uses Hypertext Transfer Protocol (HTTP) to transfer web pages
• Web pages use a document structure called Hypertext Markup Language (HTML)
• HTML contains tags that define the content and layout of the web pages
Internet v Web
© 2009 Michael Rees
Web Applications 3
Web Software Technology
• Web server:– Software that serves web pages and related
files (entities)– Supports HTTP
• Web client (browser):– Internet host machine running client
application – Initiates HTTP requests to designated web
server to retrieve web pages and other files (entities)
– Displays (or saves or executes) retrieved entities
© 2009 Michael Rees
Retrieving a Web Page
© 2009 Michael Rees Web Applications 4
1. Browser acquires a URL
2. Browser uses DNS to determine the IP address of the web server
3. Using HTTP protocol, browser sends a request to the web server at that IP address for the named web page
4. Web server received request via HTTP, locates the file requested and transmits HTML content back to the browser via HTTP
5. The browser interprets the HTML and displays the page on the screen
This is the request-response cycle
HTTP Request–Response cycle
© 2009 Michael Rees Web Applications 5
4. Response + [Entity]
Web Server
Web Browser(Client)
3. Check Request• syntax• existence• authentication
5. Interpret & Display6. Close TCP Connection
1. Open TCPConnection2. Request + [Entity]
Uniform Resource Identifier - URI
• Two types of URI:– Uniform Resource Name - URN
• Used to identify resources with unique names, such as books (which have unique ISBN’s)
• Scheme is urn• Example: urn:foo:a123,456
– Uniform Resource Locator - URL• Specifies location at which a resource can be
found• http scheme, others are https, ftp, mailto, and
file• Example:
http://www.bond.edu.au/bondit/index.htm
© 2009 Michael Rees 6Web Applications
HTTP
• Implemented over a TCP connection
• 80 is the standard port number used
• Request:– Command line– Additional header lines– Blank line– Optional content
• Response:– Status code– Additional header lines– Blank line– Optional content
© 2009 Michael Rees Web Applications 7
More details on HTTP
HTTP Example
• To acquire: http://www.somehost.com/path/file.html
• Request
GET /path/file.html HTTP/1.0From: [email protected]: HTTPTool/1.0[blank line here]
• Response
HTTP/1.0 200 OKDate: Fri, 31 Dec 1999 23:59:59 GMTContent-Type: text/htmlContent-Length: 1354
<html><body><h1>Happy New Millennium!</h1>
(more file contents) . . .</body></html>
© 2009 Michael Rees Web Applications 8
Multipurpose Internet Mail Extensions
• Abbreviated to MIME
• Convention for specifying content type of a message– In HTTP, typically used to specify content
type of the body of the response
• MIME content type syntax:– top-level type / subtype
• Examples: text/html, image/jpeg
© 2009 Michael Rees 9Web Applications
Secure Servers
• HTTP messages typically travel over a public network
• Private information (such as credit card numbers) should be encrypted to prevent eavesdropping
• https URL scheme tells browser to use encryption
• Common encryption standards:– Secure Socket Layer (SSL)– Transport Layer Security (TLS)
© 2009 Michael Rees 10Web Applications
Secure Servers
BrowserWeb
Server
I’d like to talk securely to you (over port 443)
Here’s my certificate and encryption data
Here’s an encrypted HTTP request
Here’s an encrypted HTTP response
Here’s an encrypted HTTP request
Here’s an encrypted HTTP response
TLS/SSL
TLS/SSL
HTTPRequests
HTTPResponses
HTTPRequests
HTTPResponses
© 2009 Michael Rees 11Web Applications
Resources
• Read Sections 1.1 through 1.8 of textbook
© 2009 Michael Rees Web Applications 12