Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.

Similar presentations


Presentation on theme: "1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software."— Presentation transcript:

1 1 The World Wide Web

2 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software  The most important elements of web pages are the hyperlinks to other resources on the same or other servers

3 3 The World Wide Web  Links may appear as highlighted text, images or parts of images  They allow progression from page to page without any knowledge of the location or underlying details of the communication  Comprise of two parts: Visible link or anchor (image, text) Target of link, described by a Uniform Resource Locator (URL)

4 4 The World Wide Web  The WWW is nearly a pure client-server system  Content is held by the web servers and requested by the client  Servers do not initiate activities  The only exceptions to this are  Server push  Applets which run on the client machine

5 5 Internet Protocols  The Internet employs several protocols, FTP, SMTP, HTTP etc.  Hypertext Transfer Protocol (HTTP) is the original web communications protocol

6 6 HTTP  HTTP operation:  Client opens a TCP connection to the Web server and sends a HTTP header  The header contains a HTTP command such as get, put or post and the path portion of the URL  The header may also include authentication information acceptable documentation formats etc. cookies

7 7 HTTP  HTTP operation:  When the server has processed the request it transmits a reply header back to the client followed by the page to be displayed  One of the header fields specifies the format of the data being returned This enables the display of different kinds of data (e.g. text, images, etc)  Once the required resource (html page, query result etc) has been sent HTTP closes the connection

8 8 HTTP  HTTP is a stateless protocol, i.e. it does not maintain any connection information between transactions  HTTP commands:  Get - used to retrieve documents  Put - upload files to the server  Post - used by the client to send form results back to the server

9 9 Cookies  A cookie is a piece of text that a web server can store on a user's hard disk  Cookies allow a web site to store information on a user's machine and later retrieve it  The pieces of information are stored as name-value pairs e.g.  User-ID DG10098JK

10 10 Cookies

11 11 Cookies  The vast majority of sites store just one piece of information -- a user ID -- on your machine  But there really is no limit -- a site can store as many name-value pairs as it likes

12 12 Cookie Process  When you type in a URL your browser looks on your machine for a cookie file that that web site has previously set  If it finds a matching cookie file, your browser will send all of the name-value pairs in the file to the server along with the URL request  The Web server receives the cookie data and the request for a page. If name-value pairs are received, the web site can use them

13 13 Cookie Process  If no name-value pairs are received, the web site knows that you have not visited before  The server creates a new ID for you in its database and then sends name-value pairs to your machine in the header for the Web page you requested  Your machine stores the name-value pairs on your hard disk  The Web server can change name-value pairs or add new pairs whenever you visit the site and request a page

14 14 Cookies  Cookies allow sites to store state information, this means that:  Sites can accurately determine how many users actually visit the site Determine how many visitors arrive Determine how many are new vs. repeat visitors Determine how often a visitor has visited  Sites can store user preferences so that the site can be customised for each visitor

15 15 Cookies

16 16 Cookies  Ecommerce sites can implement things like shopping carts and "quick checkout" options  The cookie contains an ID and lets the site keep track of you as you add different things to your cart  Each item you add to your shopping cart is stored in the site's database along with your ID value  At check out, the site knows what is in your cart by retrieving all of your selections from the database  It would be impossible to implement a convenient shopping mechanism without some state mechanism

17 17 Cookie Problems  Public or shared machines  Cookie information can not be guaranteed permanent  Users often use multiple machines  Web servers hold a lot of information about your activities at their site and can sell this information on  Cross-site profiling

18 18 HTML  Hyper Text Markup Language  File format for web  Text based  No special tooling needed  Can be written in Notepad  Special tooling is nice though!  Instructs web browser how to draw a page

19 19 Hyper Text  Clickable links  First developed to enhance simple text  Automatically follow references  Now everything can be a link Simple text link

20 20 Markup language /1  Annotation of text to indicate style

21 21 Markup language /2  Annotation of text to indicate style Party Address: 166 East Slope University of Sussex Tonight

22 22 Markup language /3  More ‘type’ friendly version  HTML is based on something like this Party Tonight Address: 166 East Slope University of Sussex

23 23 HTML Tags /1  HTML uses tags to mark up text  Tags come in pairs with data between  Only one tag can be used if there is no data  Data between the tags is effected This text is small Beginning tag End tag (note the / in front of the tag name) Effected data

24 24 HTML Tags /2  Tags can have attributes  Extra data to customise or program the tags effect This is blue Attribute name Attribute value Note: HTML uses U.S. English spelling for tag names

25 25 HTML Tags /3  Some basic HTML tags:  Bold text  Centre text  Specifies text size and colour  Italic text  Underline text  Reference citation (normally italic)  …  Tags were designed along time ago  HTML suffers from legacy problems

26 26 HTML Tags /4  Multiple tags can be used at once  Tags are closed in the opposite order to opening This is Bold, Italic & Underlined

27 27 HTML Tags /4  Think of it like boxes in boxes… This is Bold, Italic & Underlined

28 28 HTML Tags /4  It can be extended further… Bold, Italic & Underlined Just Bold

29 29 HTML File  All tags and text is written into a file  This file is loaded and viewed by a browser

30 30 Fin


Download ppt "1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software."

Similar presentations


Ads by Google