 Three major techniques in WWW (World Wide Web) System › HTML › HTTP › URL  HTML (1) – H yper T ext M arkup L anguage › Providing a means to describe.

Slides:



Advertisements
Similar presentations
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Advertisements

Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Chapter 22 Web Hosting. Computer Center, CS, NCTU 2 Web Hosting – Basics (1)  Three major techniques in WWW (World Wide Web) System HTML HTTP URL  HTML.
IST 535 Week 1 Class Orientation / Review of Web Basics.
The Web The World Wide Web What does it do?.
How the web works: HTTP and CGI explained
Chapter 22 Web Hosting and Internet Servers. Computer Center, CS, NCTU 2 Web Hosting Basics (1)  Three major techniques in WWW (World Wide Web) System.
HTTP Exercise 01. Three Internet Protocols IP TCP HTTP Routes messages thru “Inter-network “ 2-way Connection between programs on 2 computers So they.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
IST 221 Internet Concepts and Applications Internet, WWW and HTML 1.
1 The HyperText Transfer Protocol: HTTP Nick Smith Stuart Alley Tara Tjaden.
Definitions, Definitions, Definitions Lead to Understanding.
World Wide Web WeeSan Lee
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
Hypertext Transport Protocol CS Dick Steflik.
Linux Operations and Administration
Appendix: Installing AMP (Apache + MySQL + PHP). Training Course, CS, NCTU 2 AMP  AMP A – Apache Web Server M – MySQL Database Server P – PHP Language.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Web. Computer Center, CS, NCTU 2 Outline  Web hosting Basics Client-Server architecture HTTP protocol Static vs. dynamic pages Virtual hosts  Proxy.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Human-Computer Interface Course 5. ISPs and Internet connection.
Web Architecture Dr. Frank McCown Intro to Web Science Harding University This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
FTP (File Transfer Protocol) & Telnet
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
Chapter 1 Fundamentals. © 2006 Pearson Addison-Wesley. All rights reserved A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and.
1 Welcome to CSC 301 Web Programming Charles Frank.
Chapter 1 © 2003 by Addison-Wesley, Inc. 1 Chapter 1 Fundamentals.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Chapter 1 Fundamentals. © 2006 Pearson Addison-Wesley. All rights reserved A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and.
Form Data Encoding GET – URL encoded POST – URL encoded
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Chapter 1 Fundamentals. Internet History Internet Protocols.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
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)
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
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):
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
INTRODUCTION Dr Mohd Soperi Mohd Zahid Semester /16.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web.
Distributed Control and Measurement via the Internet
Web.
WWW and HTTP King Fahd University of Petroleum & Minerals
Chapter 22 Web Hosting and Internet Servers
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Web hwlin1414.
Chapter 27 WWW and HTTP.
The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol
Traditional Internet Applications
Presentation transcript:

 Three major techniques in WWW (World Wide Web) System › HTML › HTTP › URL  HTML (1) – H yper T ext M arkup L anguage › Providing a means to describe the structure of text-based information in a document. › The original HTML is created by Tim Berners-Lee. › Published in 1993 by the IETF as a formal "application" of SGML (with an SGML Document Type Definition defining the grammar). › The HTML specifications have been maintained by the World Wide Web Consortium (W3C). 

 HTML (2) › Mark-up the text and define presentation effect by HTML Tags. Hello World! Hello Wrold!

 HTTP – Hyper Text Transfer Protocol › A TCP-based protocol › Communication method between client and server, both browsers and web servers have to follow this standard. › Originally designed to transmit HTML pages. › Now it is used to format, transmit, and link documents of variety media types  Text, picture, sound, animation, video, … › HTTPS – secured version. RFC 2616

 URL – Uniform Resource Locator › Describe how to access an object shared on the Internet › Format  Protocol :// [ [ username [ :password ] hostname [ :port ] ] [ /directory ] [ /filename ] › ex:   ftp://ftp.cs.nctu.edu.tw/  telnet://bs2.to/ RFC 1738

 URL Protocols ProtoWhat it doesExample httpAccesses a remote file via HTTP httpsAccesses a remote file via HTTP/SSL ftpAccesses a remote file via FTP ftp://ftp.cs.nctu.edu.tw/ mailtoSends mail newsAccesses Usenet newsgroups news:tw.bbs.comp.hardware telnetLogs in to a remote computer telnet://bbs.cs.nctu.edu.tw fileAccess a local file file:///home/lwhsu/.tcshrc

 Client-server architecture › Web Server: Answer HTTP request › Web Client: Request certain page using URL 2. 以 HTTP 協定送出 Request 4. 以 HTTP 協定回覆 Response 1. 以 URL 描述索取的資 源位置向 Server 發送要求 3. 從 URL 描述的位置將 HTML 文件取出並回覆給 Client 5. 接收到 HTML 後由 Browser 解析後根據 HTML 描述定義將 資料呈現出來 Browser Client Web Server

 Using “ telnet ” to retrieve data from web server knight:~ -lwhsu- telnet 80 Trying Connected to Escape character is '^]'. GET /~lwhsu/hello.html HTTP/1.0 Host: HTTP/ OK Date: Mon, 24 Nov :40:29 GMT Server: Apache Last-Modified: Mon, 24 Nov :30:27 GMT ETag: "645b c761a7ae2c0" Accept-Ranges: bytes Content-Length: 151 Content-Type: text/html X-Cache: MISS from X-Cache-Lookup: MISS from Via: (squid/2.6.STABLE18) Connection: close Hello World! Hello Wrold! Connection closed by foreign host.

 HTTP: Hypertext Transfer Protocol › RFCs: (HTTP 1.1) (Updated Version) › Useful Reference: › A network protocol used to deliver virtually all files and other data on the World Wide Web.  HTML files, image files, query results, or anything else. › Client-Server Architecture  A browser is an HTTP client because it sends requests to an HTTP server (Web server), which then sends responses back to the client.

 Clients: ※ Send Requests to Servers › Action “path or URL” Protocal  Actions: GET, POST, HEAD  Ex. GET /index.php HTTP/1.1 › Headers  Header_Name: value  Ex. From: › (blank line) › Data …  Servers: ※ Respond to the clinets › Status:  200: OK  404: Not Found  …  Ex. HTTP/ OK › Headers  Same as clients  Ex. Content-Type: text/html › (blank line) › Data…

knight:~ -lwhsu- telnet 80 Trying Connected to Escape character is '^]'. GET /~lwhsu/hello.html HTTP/1.0 Host: HTTP/ OK Date: Mon, 24 Nov :40:29 GMT Server: Apache Last-Modified: Mon, 24 Nov :30:27 GMT ETag: "645b c761a7ae2c0" Accept-Ranges: bytes Content-Length: 151 Content-Type: text/html X-Cache: MISS from X-Cache-Lookup: MISS from Via: (squid/2.6.STABLE18) Connection: close... Connection closed by foreign host. status Headers Data action Headers

 Get vs. Post (client side) › Get:  Parameters in URL GET HTTP/1.1  No data content  Corresponding in HTML files  Link URL:  Using Form: … › Post:  Parameters in Data Content POST HTTP/1.1  Corresponding in HTML files  Using Form: …

 HTTP Headers: › What HTTP Headers can do? [Ref]  Content information (type, date, size, encoding, …)  Cache control  Authentication  URL Redirection  Transmitting cookies  Knowing where client come from  Knowing what software client use  …

 Static vs. Dynamic Pages › Technologies of Dynamic Web Pages  Client Script Language  JavaScript, Jscript, VBScript  Client Interactive Technology  Java Applet, Flash, XMLHTTP,AJAX  Server Side  CGI  Languages: Perl, ASP, JSP, PHP, C/C++, …etc.

 CGI (Common Gateway Interface) › A specification that allows an HTTP server to exchange information with other programs

 Providing services for more than one domain-name (or IP) in one web server.  IP-Based Virtual Hosting vs. Name-Based Virtual Hosting  IP-Base– Several IPs (or ports)  Name-Base– Singe IP, several hostnames  Example (Apache configuration) DocumentRoot "/home/lwhsu/netadm" ServerName sysadm.nctu.edu.tw DocumentRoot /www/tphp ServerName tphp.cs.nctu.edu.tw NameVirtualHost ServerName sysadm.cs.nctu.edu.tw DocumentRoot "/home/lwhsu/sysadm" ServerName netadm.cs.nctu.edu.tw DocumentRoot "/home/lwhsu/netadm"

Q: How Name-Based Virtual Hosting works? A: It takes advantage of HTTP Headers. telnet cswproxy.cs.nctu.edu.tw 80 Trying Connected to Escape character is '^]'. GET / HTTP/1.0 Host: HTTP/ Moved Permanently Date: Tue, 25 Nov :35:37 GMT Server: Apache Location: cht/announcements/index.php Content-Length: 0 Content-Type: text/html Connection closed by foreign host. knight:~ -lwhsu- telnet cswproxy.cs.nctu.edu.tw 80 Trying Connected to cswproxy.cs.nctu.edu.tw. Escape character is '^]'. GET / HTTP/1.0 Host: HTTP/ OK Date: Tue, 25 Nov :38:06 GMT Server: Apache Last-Modified: Thu, 15 Nov :51:20 GMT Content-Length: 113 Content-Type: text/html NCTU -- CS Connection closed by foreign host.

 Idea › Let single machine responds to more IP addresses than it has physical network interfaces › Each of the virtual network interface can be associated with different domain name FreeBSD:~ -lwhsu- ifconfig em0: flags=8843 metric 0 mtu 1500 options=19b ether 00:e0:81:4c:98:32 inet netmask 0xffffff00 broadcast inet netmask 0xffffffff broadcast inet netmask 0xffffffff broadcast media: Ethernet autoselect (1000baseTX ) status: active lo0: flags=8049 metric 0 mtu inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet6 ::1 prefixlen 128 inet netmask 0xff000000

 Using “ ifconfig ” command and “ alias ” option › $ ifconfig em0 inet netmask alias › $ ifconfig em0 inet delete › $ ifconfig em0 inet alias (when you want to delete it)  Specify in /etc/rc.conf hostname="FreeBSD.cs.nctu.edu.tw" defaultrouter=" “ ifconfig_em0="inet netmask " ifconfig_em0_alias0="inet /32" ifconfig_em0_alias1="inet /32”