Refresher Lectures WEBPG2/CWP 112 by CSN. Refresher Lectures The Internet and WWW HTTP HTML URL.

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

Introduction to Computing Using Python CSC Winter 2013 Week 8: WWW and Search  World Wide Web  Python Modules for WWW  Web Crawling  Thursday:
4.01 How Web Pages Work.
Developing a Web Site: Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down A user can select a link.
XP Adding Hypertext Links to a Web Page. XP Objectives Create hypertext links between elements within a Web page Create hypertext links between Web pages.
IST 535 Week 1 Class Orientation / Review of Web Basics.
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.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
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.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Rensselaer Polytechnic Institute CSC-432 – Operating Systems David Goldschmidt, Ph.D.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
FTP (File Transfer Protocol) & Telnet
Internet Basics Dr. Norm Friesen June 22, Questions What is the Internet? What is the Web? How are they different? How do they work? How do they.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
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.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
XHTML Introductory1 Linking and Publishing Basic Web Pages Chapter 3.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 The World Wide Web is a collection of electronic documents linked together like a spider web.  These documents are stored on computers called servers.
1 John Magee 9 November 2012 CS120 Lecture 17: The World Wide Web and HTML Web Publishing.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Introduction to HTML. Today’s Discussion What is HTML ? What is HTML ? What is Web Page ? What is Web Page ? Web Server Web Server Web Browser Web Browser.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
HOW THE WEB WORKS Reference: Learning Web Design (4 th edition) by Robbins 2012 – Chapter 2 (pp. 21 – 32)
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.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
1 Lecture 12 Lecture 12 Basic HTML ITEC 1000 “Introduction to Information Technology”
World Wide Web. The World Wide Web is a system of interlinked hypertext documents accessed via the Internet The World Wide Web is a system of interlinked.
4.01 How Web Pages Work.
Introduction to the Internet
4.01 How Web Pages Work.
Intro to HTML CS 1150 Spring 2017.
Web Systems & Technologies
Introduction to HTML.
HTML Basics.
4.01 How Web Pages Work.
Intro to HTML CS 1150 Fall 2016.
HTTP – An overview.
Networking CS 3470, Section 1 Sarah Diesburg
Warm Handshake with Websites, Servers and Web Servers:
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Sec (4.3) The World Wide Web.
E-commerce | WWW World Wide Web - Concepts
E-commerce | WWW World Wide Web - Concepts
CASE STUDY -HTML,URLs,HTTP
Introduction to XHTML.
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
CISC103 Web Development Basics: Web site:
The Internet and HTTP and DNS Examples
1 Introduction to the Internet.
HTTP Hypertext Transfer Protocol
CNIT 131 HTML5 – Anchor/Link.
Introduction to the Internet and Web
Web Page Concept and Design :
Web Server Technology Unit 10 Website Design and Development.
HyperText Transfer Protocol
EE 122: HyperText Transfer Protocol (HTTP)
Chapter 16 The World Wide Web.
Introduction to HTML.
Traditional Internet Applications
HTTP Hypertext Transfer Protocol
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Presentation transcript:

Refresher Lectures WEBPG2/CWP 112 by CSN

Refresher Lectures The Internet and WWW HTTP HTML URL

The Internet and WWW WEBPG2 Welcome Lecture

The Internet and WWW Aims To learn some network, Internet and WWW terminologies

LAN Local Area Networks (LAN) connected computers that are relatively close to each other, typically within the same room or building

WAN Wide Area Networks (WAN) connected devices or other networks over a greater distance

internet A network of networks is an internet

The Internet The Internet is a global internet that uses a particular set of communications protocols (the TCP/IP stack of protocols)

Protocols If different networks are to inter-operate, we need to specify and agree the rules by which two computers on different networks will exchange messages In computer networking, such a set of rules is called a communications protocol

The WWW WWW = hypermedia + the Internet Hypermedia text, picture, audio, video, animation, object The Internet is not the World Wide Web The World Wide Web is an application of the Internet is another application of the Internet

Web requests and responses web client hardware, running web client software, e.g. web browser web server hardware running web server software HTTP GET Request HTTP Response

Hypertext Transfer Protocol (HTTP) WEBPG2 Welcome Lecture

HTTP Aims: to know a little about simple HTTP requests that request (static) web pages to see where DNS fits in

The Web is a client-server application Web client computers run web client software (e.g. browsers) the software make requests for web resources (e.g. (X)HTML files, CSS files, image files,...) Web server computers host web resources (text files, graphics files, programs,...) run web server software that responds to requests

Ports One server might be offering ('hosting') more than one service E.g. a server computer may be running web server software and server software How does a client indicate which server program is to handle its requests? Each server program is assigned an identification number, called a port number

Listening on ports Web Client SoftwareServer request80 Port Number Address of Server Program 80Web FTP

What your browser does when you enter a URL or click on a link... If it needs to request a new web page, your browser works out: the protocol (which usually defaults to http) the server name (e.g. the port number (which defaults to 80) the pathname of the file you want (e.g. /manila/index.html) Your browser must now send a request to the web server, asking for this file The request (and the server's response) must be formulated according to a communications protocol (in this case, HTTP)

HTTP requests Request line (required): command (method), URL and HTTP version number Request header lines (largely optional): info about date, browser,... Request message body (optional): empty for most commands (methods)

HTTP requests GET /manila/index.html HTTP/1.1 Date: Fri, 01 June :00:00 GMT Connection: close Host: From: Accept: text/html, text/plain User-Agent: Mozilla/4.0 Request Line Request header Lines Message Body

HTTP Responses Status line (optional): HTTP version number, status code, short explanation of code Response header lines (optional): info about date, server,... Response message body (required): the requested resource (web page, image,...)

HTTP Responses HTTP/ OK Date: Fri, 01 June :00:00 GMT Connection: close Server: Apache 2.0 Accept-Ranges: bytes Content-Type: text/html Content-Length: 200 Last-Modified: Fri, 31 May :14:00 GMT User-Agent: Mozilla/4.0 UE Welcome to UE Status Line Response header Lines Response Message Body

HTTP response status codes 1XX: Informational (used in 1.1): e.g. 100 Continue, 101 Switching Protocols 2XX: Success: e.g. 200 OK, 206 Partial Content 3XX: Redirection: e.g. 301 Moved Permanently, 304 Not Modified 4XX: Client error: e.g. 400 Bad Request, 403 Forbidden, 404 Not Found 5XX: Server error: e.g. 500 Internal Server Error, 503 Service Unavailable

DNS Domain Name System Prior to sending the HTTP request, your browser needs to convert from server name to server IP address 

Embedded Content Suppose the web page contains embedded content (e.g. stylesheets, images) The server does not send all the content in one go The client receives the web page and then sends separate requests for the embedded content

HTML WEBPG2 Welcome Lecture

HTML Aims: to understand structural and presentational markup to know the components of HTML to understand the hierarchical structure of (X)HTML documents

Markup languages Annotations on a document are called markup In Computer Science, the markup is included as extra text in the document It is included for the benefit of programs, such as web browsers

Elements, attributes and values An HTML document comprises elements An element comprises content (the text), plus markup (the tags: start tag and end tag) element = start tag + content + end tag Tags may take attributes and their values to make them more specific

Elements html (lang), head, meta, title, link (rel, href), body h1—h6, p, em, strong, i, b ul, ol, li section, nav a (href) img (src, title, alt) table, caption, tr th, td (colspan, rowspan) pre

Character references To include special characters in the content, use character references << >> (space) &&

Void elements For some elements (e.g. img and link), there is never any content—void element For these, never write the end tag The way we write them (the XHTML syntax), e.g.:

Nested elements One element can be nested within another, to several layers, provided the nesting is done properly: Correct: This is correct Incorrect: This is incorrect

Uniform Resource Locator WEBPG2 Welcome Lecture

URL Aims: to know the parts of a simple URL to know the difference between absolute and relative URLs to know what kind of URL to use for external and internal links

Without hyperlinks, it wouldn't be a web! A link is a connection from one Web resource to another One way to link to a resource is to say where it is located (its 'address') On the Web, these 'addresses' are called Uniform Resource Locators (URLs) text UE Home

URLs A URL comprises a protocol and the 'rest' separated by a colon or a colon and two forward slashes The scheme tells the client (e.g. your browser) what to do with the rest of the URL Protocols: http, e.g. https, e.g. file:///F:/My%20Pictures/ %20- %20Photoshoots/csn_800.jpg mailto, e.g. Question: If you omit the protocol, what does your browser assume?

HTTP URLs In general, the format is: address:port/pathname?query#fragment We will focus on the main parts: E.g.

IP addresses Every device on a network has a hardware address (e.g. MAC address), unique to that network (at least) But we need an address that is unique across the whole Internet Hence, every device that is connected to the Internet is assigned a unique IP address (Simplification!) To send a message to a device you use its IP address

The Domain Name System (DNS) Numeric IP addresses are cumbersome for humans Hence, most computers (hosts) that are connected to the Internet also have one (or more) names (hostnames) E.g. DNS acts like a directory enquiries system: it automatically takes names and translates them into IP addresses

Pathname Directories/folder are organised hierarchically A pathname is typically a sequence of directories/folders, ending with the file name E.g. /dirA/dirC/a.html

Pathname

Links Absolute URLRelative URL External Link hostname + absolute pathname n/a Internal Linkabsolute pathnamerelative pathname

Absolute URLs and relative URLs Absolute URLs use absolute pathnames: ones that give complete directions to the file starting from the top of the file hierarchy (/) Relative URLs use relative pathnames: ones that give directions to the file starting from the current document

Using an absolute URL for an external link Example: UE Since you are linking to a page on another computer, you must include: the hostname (or IP address), e.g. an absolute pathname, e.g. /manila/index.html These are also the URLs that you can see in (or type into) the Location box in your browser

Using an absolute URL for an internal link Since you are linking to a page on the same computer, you can omit the hostname/IP address But you include the absolute pathname of the file you're linking to (starting with /) E.g. suppose I am putting an anchor element into a.html that links to c.html Click me Forward slash at the start Question: You can include the hostname (or IP address). But why is it better to omit it (as in these examples)?

Using a relative URL for an internal link In this case, you omit the hostname/IP address But you include the relative pathname of the file you're linking to, i.e. starting from the current document E.g. suppose I am putting an anchor element into a.html that links to c.html Click me No forward slash at the start

Index files Omitting the file name (so the URL ends with a slash) gives the URL of a directory E.g. In this case, most servers look for a default file to display Most often, they look for a file called index.html If there is no such file, they'll probably just list the contents of the directory or display an error message if directory listing is not allowed

File and folder names Unix/Linux/Mac OS X are case-sensitive; Windows isn't It's best to use only lowercase, to avoid all problems Avoid space and punctuation characters in these names Suppose your file is called my page.html (which has a space) URLs cannot contain spaces: they must be encoded as %20 E.g. My page The same applies to about 20 other characters too,

Fragments We also know how to link to a particular point within a document E.g. at the bottom of the page, we can include a link back to the top How?

References Gosselin, D., Kokoska, D., & Easterbrooks, R. (2011). PHP programming with MySQL. Boston, MA: Course Technology Cengage Learning. php.net (nd), PHP, Retrieved November 13, 2011 from Wikipedia (n.d.), Wikipedia, The Free Encyclopedia, Retrieved November 13, 2011 from