CS 22: Enhanced Web Site Design - Week 8Slide 1 of 15 Enhanced Web Site Design Stanford University Continuing Studies CS 22 Mark Branom

Slides:



Advertisements
Similar presentations
Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
Advertisements

PHP Form and File Handling
Enabling Secure Internet Access with ISA Server
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
1 Server Side Includes and cgi scripts Advanced Web Programming.
CGI & HTML forms CGI Common Gateway Interface  A web server is only a pipe between user-agents  and content – it does not generate content.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to Computing Using Python CSC Winter 2013 Week 8: WWW and Search  World Wide Web  Python Modules for WWW  Web Crawling  Thursday:
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 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
DT228/3 Web Development WWW and Client server model.
COEN 445 Communication Networks and Protocols Lab 4
Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
Common Gateway Interface (CGI). CGI is a protocol: CGI is not a programming language CGI is a protocol for the exchange of information between between.
Server-Side vs. Client-Side Scripting Languages
How does the server format the information it gives to the appln program? As environment variables and in standard input.
How the web works: HTTP and CGI explained
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Hypertext Transport Protocol CS Dick Steflik.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
Web Client/Server Communication A290/A590, Fall /09/2014.
Common Gateway Interface
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Overview A plain HTML document is static A CGI program is executed in real-time, so that it can output dynamic information. CGI (Common Gateway Interface)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 Web Server Concepts Dr. Awad Khalil Computer Science Department AUC.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Server tools. Site server tools can be utilised to build, host, track and monitor transactions on a business site. There are a wide range of possibilities.
FTP (File Transfer Protocol) & Telnet
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.
Web application architecture
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster
W orld W ide W eb Client/Server design using TCP/IP Incorporates Other Client/Server Systems –ftp –gopher –mail Server runs on port 80, named httpd, exchanges.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
JavaScript Tutorial 1 - Introduction to JavaScript1 Tutorial 1 Introduction to JavaScript Section A – Programming, HTML, and JavaScript.
Form Data Encoding GET – URL encoded POST – URL encoded
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.
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
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.
Lecture 19 Overview. Hyper Text Transfer Protocol HTTP is the protocol that supports communication between web browsers and web servers. – A “Web Server”
Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Server Side Includes (SSI) Instructor: Joseph DiVerdi,
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
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.
CS 330 Class 7 Comments on Exam Programming plan for today:
WWW and HTTP King Fahd University of Petroleum & Minerals
CISC103 Web Development Basics: Web site:
Hypertext Transport Protocol
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CISC103 Web Development Basics: Web site:
Chapter 27 WWW and HTTP.
Configuring Internet-related services
The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol
Presentation transcript:

CS 22: Enhanced Web Site Design - Week 8Slide 1 of 15 Enhanced Web Site Design Stanford University Continuing Studies CS 22 Mark Branom Course Web Site:

Slide 2 of 15 CS 22: Enhanced Web Site Design - Week 8 Week 8 Unfinished business Including Files –Server Side Includes –PHP includes –JavaScript includes JavaScript Cookies

Slide 3 of 15 CS 22: Enhanced Web Site Design - Week 8 Including Files File inclusion allows webmasters to create documents which provide information to clients on the fly. Such information can include the current date, the file's last modification date, and the size or last modification of other files. Or it can be used to create common content across the web site (header, footer, links area, etc.).

Slide 4 of 15 CS 22: Enhanced Web Site Design - Week 8 Server Side Includes (SSI) Having the server parse documents is a double edged sword. It can be costly for heavily loaded servers to perform parsing of files while sending them. Further, it can be considered a security risk to have average users executing commands. If you disable the exec option, this danger is mitigated, but the performance issue remains. You should consider these items carefully before activating server-side includes on your server. Not all web servers allow SSI, so check with your server admin before attempting to use SSI.

Slide 5 of 15 CS 22: Enhanced Web Site Design - Week 8 SSI syntax Generally, files are named *.shtml or *.shtm (although some servers allow *.html or *.htm)

Slide 6 of 15 CS 22: Enhanced Web Site Design - Week 8 SSI commands config ( ) –errmsg: controls what message is sent back to the client if an error includes while parsing the document. –timefmt gives the server a new format to use when providing dates –sizefmt determines the formatting to be used when displaying the size of a file. Valid choices are bytes, for a formatted byte count (formatted as 1,234,567), or abbrev for an abbreviated version displaying the number of kilobytes or megabytes the file occupies include ( ) –file: relative to current file (can’t use absolute URL) –virtual: used to access files in other directories (can use relative or absolute URL)

Slide 7 of 15 CS 22: Enhanced Web Site Design - Week 8 SSI commands echo: prints the value of one of the variables ( ) –DATE_GMT : current date and time stamp, Greenwich Mean Time –DATE_LOCAL : current date and time, Local Time (to the server) –DOCUMENT_NAME : current filename (ie, index.shtml) –DOCUMENT_URI : virtual path to the filename (ie, /group/itss/index.shtml) –LAST_MODIFIED : last modification date of the current document; can be GMT or Local, set by issuing config ssi command at server level. –SERVER_SOFTWARE : The name and version of the information server software answering the request –SERVER_NAME : The server's hostname, DNS alias, or IP address as it would appear in self- referencing URLs –GATEWAY_INTERFACE : The revision of the CGI specification to which this server complies –SERVER_PROTOCOL : The name and revision of the information protcol this request came in with –SERVER_PORT : The port number to which the request was sent –REQUEST_METHOD : HTTP method: GET OR POST –REMOTE_HOST : domain name of the client –REMOTE_ADDR : Numeric IP address of the client –AUTH_TYPE : client authorization method if any –REMOTE_USER : If the server supports user authentication, and the script is protected, this is the username they have been authenticated as –CONTENT_TYPE : MIME type of content –CONTENT_LENGTH : size of input posted from client –HTTP_ACCEPT : The MIME types which the client will accept –HTTP_USER_AGENT : The browser the client is using to send the request

Slide 8 of 15 CS 22: Enhanced Web Site Design - Week 8 SSI commands fsize ( ) –file : prints the size of the specified file flastmod ( ) –file: inserts the last modification date of a given file exec ( ) –cgi : executes cgi program on server –cmd : executes unix command

Slide 9 of 15 CS 22: Enhanced Web Site Design - Week 8 SSI example: people/markb/ssi.shtml

Slide 10 of 15 CS 22: Enhanced Web Site Design - Week 8 PHP includes If your web server allows PHP, you can use PHP to include files as well. The syntax for including a file using PHP is: Generally, both the included file and the requesting file need to be on the same server.

Slide 11 of 15 CS 22: Enhanced Web Site Design - Week 8 JavaScript Includes You can also use JavaScript to include a file: Content of filename.js: document.write('text text text‘); Two problems with JavaScript includes: –It is a client-side include, not a server-side include (so it is run on the visitor’s machine, not the server) –It requires JavaScript, which most, but not all, browsers have installed

Slide 12 of 15 CS 22: Enhanced Web Site Design - Week 8 Javascript Very powerful scripting language that can enhance a website Things you can do with javascript include: –Rollover effects –Calculators –Clocks –Calendars –Form verification –Navigation manipulation

Slide 13 of 15 CS 22: Enhanced Web Site Design - Week 8 Javascript resources Great JavaScript tutorial: – JavaScripts: – – – –

Slide 14 of 15 CS 22: Enhanced Web Site Design - Week 8 Using Dreamweaver with Javascript –Dreamweaver Exchange

Slide 15 of 15 CS 22: Enhanced Web Site Design - Week 8 JavaScript Handouts JavaScript Basics All About Cookies