Lecture 4 Web browsers, servers and HTTP Boriana Koleva Room: C54

Slides:



Advertisements
Similar presentations
World Wide Web Basics Original version by Carolyn Watters (Dalhousie U. Computer Science)
Advertisements

HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Hypertext Transfer Protocol Kyle Roth Mark Hoover.
Layer 7- Application Layer
Chapter 1 © 2002 by Addison Wesley Longman, Inc. 1 Chapter 1 Sebesta: Programming the World Wide Web.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
1 The HyperText Transfer Protocol: HTTP Nick Smith Stuart Alley Tara Tjaden.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
Topics in this presentation: The Web and how it works Difference between Web pages and web sites Web browsers and Web servers HTML purpose and structure.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Hypertext Transport Protocol CS Dick Steflik.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
FTP (File Transfer Protocol) & Telnet
Chapter 1 © 2003 by Addison-Wesley, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability - For.
Chapter 1 © 2005 by Addison Wesley Longman, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Lecture 1 by David Gevorkyan. Outline Introduction to Internet Introduction to WWW Web Servers Web Browsers URL HTTP HTML elements and attributes.
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
CIS 1310 – HTML & CSS 1 Introduction to the Internet.
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
Chapter 1 Fundamentals. © 2006 Pearson Addison-Wesley. All rights reserved A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
1 Welcome to CSC 301 Web Programming Charles Frank.
Web Client-Server Server Client Hypertext link TCP port 80.
Chapter 1 © 2003 by Addison-Wesley, Inc. 1 Chapter 1 Fundamentals.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Chapter 1 Fundamentals. © 2006 Pearson Addison-Wesley. All rights reserved A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and.
CS2043 Internet Visual Prog. / Appl. An introduction to Internet visual programming and applications. Major topics include object-oriented concepts, graphical.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
Chapter 1 Fundamentals. Internet History Internet Protocols.
Jan.2001C.Watters1 World Wide Web Basics. Jan.2001C.Watters2 What is an internet anyway? 2 or more networks that can communicate.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Web Design A Brief Intro to the Internet Internet History Internet Protocols 2.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
CS 6401 The World Wide Web Outline Background Structure Protocols.
Fundamentals. A Brief Intro to the Internet - Origins - ARPAnet - late 1960s - Network reliability - For ARPA-funded research organizations - BITnet,
Computer Networks with Internet Technology William Stallings Chapter 04 Modern Applications 4.1 Web Access - HTTP.
JavaScript and Ajax (Internet Background) Week 1 Web site:
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
INTERNET AND . WHAT IS INTERNET The Internet can be defined as the wired or wireless mode of communication through which one can receive, transmit.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
INTRODUCTION Dr Mohd Soperi Mohd Zahid Semester /16.
4.01 How Web Pages Work.
HTTP – An overview.
Hypertext Transfer Protocol
Warm Handshake with Websites, Servers and Web Servers:
Chapter 1 Fundamentals.
1.1 A Brief Intro to the Internet
Web Page Concept and Design :
HyperText Transfer Protocol
4.01 How Web Pages Work.
1.1 A Brief Intro to the Internet
Presentation transcript:

Lecture 4 Web browsers, servers and HTTP Boriana Koleva Room: C54

Overview Client-server paradigm Web browsers Web servers URLs MIME HTTP ‘Warriors of the net’ video

The client server paradigm A widely used form of communication Server application waits passively for contact from clients A server provides a specific service Client application actively initiates contact with the server Information can flow in both directions Typical situation is many clients interacting with each server

Web Browsers Browsers are clients always initiate, servers react Allow user to browse resources available on server either existing or dynamically built documents Mosaic - NCSA (Univ. of Illinois), in early 1993 First to use a GUI, led to explosion of Web use Initially for X-Windows, under UNIX, but was ported to other platforms by late 1993 Current common browsers Firefox, Internet Explorer, Google Chrome, Safari

Web Servers Provide responses to browser requests All communications between browsers and servers use Hypertext Transfer Protocol (HTTP) Web servers run as background processes in the operating system Monitor a communications port on the host, accepting HTTP messages when they appear Common servers Apache, Internet Information Server (IIS), Google Web Server

Uniform Resource Locators (URLs) Standard way of specifying entities on networks First part - protocol terminated by colon ( : ) common protocols are http, ftp, mailto, telnet, i.e.: http: ftp: mailto: telnet: Second part - varies according to protocol mailto - address e.g.: mailto: resource-oriented protocols (http, ftp etc) Host name + domain names (preceded by //) may optionally include username, password and port Pathname (usually related to the path of a file on the server) i.e. //fully-qualified-domain-name/path-to-document Optional third parts Query string (preceded by ?) Fragment identifier (preceded by #)

Example URLs ftp://acomputer.cs.nott.ac.uk/

General Server Characteristics Web servers have two main directories: 1. Server root (server system software) 2. Document root (servable documents) This will map to the URL of the full domain name, e.g.: User document root directory Directories of a standard name in the users home directory Usually this is called public_html The URL is then mapped as ~username e.g.:

General Server Characteristics Document root is accessed indirectly by clients Its actual location is set by the server configuration file Requests are mapped to the actual location E.g. doc root is topdocs and stored in /admin/web Site is When there is a request for Server searches for file with address /admin/web/topdocs/bulbs/tulips.html

Additional Server Features Virtual document trees Part of servable document collection stored outside the document root Virtual hosting Support for more than one site on a computer Proxy servers Serve documents that are in the document root of other machines

Multipurpose Internet Mail Extensions (MIME) Originally developed for Used to specify document types transmitted over the Web MIME type attached by the server to the beginning of the document Type specifications Form: type/subtype Examples: text/plain, text/html, image/gif, image/jpeg

MIME Server gets type from the requested file name’s suffix (.html implies text/html) Browser gets the type explicitly from the server Experimental types Subtype begins with x- e.g. video/x-msvideo Experimental types require the server to send a helper application or plug-in so the browser can deal with the file

World Wide Web Overview HTTP Server Apache MS IIS Client Netscape Navigator MS Internet Explorer HTTP request (URL) HTTP response (HTML data)

Design Paradigm of the WWW WWW is a global hypertext system The page is the basic unit of the WWW Each page has a unique identifier – the URL Pages may contain links to data of any type Some data (e.g. images) may be interpreted by the browser and displayed “inline” Pages may contain links to other URLs

The HTTP Protocol Invented by Tim Berners-Lee in 1990 RFC 1945 (1996) - HTTP/1.0 RFC 2068 (1997) - HTTP/1.1 RFC 2616 (1999) - HTTP/1.1 (update to 2068)

Features of HTTP Application level, client-server protocol Primarily for distributed hypermedia systems Flexible - thus has many other uses - e.g.: Nameservers Distributed & collaborative document management systems HTTP is small and fast Minimal performance overhead Easy to implement HTTP is a stateless protocol Each request is an independent transaction - unrelated to any previous requests (unlike session-based protocols, e.g. FTP) Advantage Simplifies server design - information about previous transactions does not need to be stored Disadvantage More information must be included in each request

HTTP Operation On the Internet HTTP usually uses TCP/IP connections TCP Port 80 is the default (though others can be specified) HTTP uses a Request/Response paradigm Client establishes a connection to the server, and sends it a request Server responds to the request by generating a response (which may or may not contain content)

HTTP Request Delivered from a client to a server containing instructions for the server Contains the method to be applied to the data resource the identifier of the resource the protocol version in use Most commonly used methods: GET - Fetch a document HEAD - Fetch just the header of the document POST - Execute the document, using the data in body PUT - Store a new document on the server DELETE - Remove a document from the server

Request message METHOD /path-to-resource HTTP/version-number Header-Name-1: value Header-Name-2: value [optional request body] General request message structure GET /index.html HTTP/1.1 Host: Accept: text/* User-Agent: Mozilla/2.02Gold (WinNT; I) Example

telnet HTTP request A browsers is not necessary to communicate with a web server > telnet blanca.uccs.edu http GET /respond.html HTTP/1.1 Host: blanca.uccs.edu

HTTP Response Message generated by a server after receiving and interpreting a request Responses contain: Status line with the protocol version, a status code, and a “reason phrase” Response-Header (containing information about the server) Entity Header (meta-information) Entity Body (data)

Response message HTTP/version-number status-code message Response-Header-Name-1: value Response-Header-Name-2: value Entity-Header-Name-1: value Entity-Header-Name-2: value [optional entity body] General response message structure HTTP/ OK Server: Apache (Red-Hat/Linux) Content-Type: text/html Content-Length: 9934 School of Computer Science … Example

Some HTTP Status Codes 200 : OK 201 : Created 202 : Accepted 204 : No Content 301 : Moved Permanently 302 : Moved Temporarily 400 : Bad Request 401 : Unauthorized 403 : Forbidden 404 : Not Found 500 : Internal Server Error 503 : Service Unavailable

Summary Client-server paradigm Web browsers Web servers URLs MIME types HTTP protocol Requests and responses