Static, Client Scripting and Server Scripting Pages

This section provides a tutorial on comparing 3 types of Web pages: static page, client scripting page and server scripting page. Server scripting pages are called ASP pages.

Here, I have 3 Web pages to display times from 3 different sources:

time_static.html: A static page displaying static time.

<html><body>The current static time is: 
11/26/1999 10:19:46 PM 
</body></html>

If you open this page with any Web browser, you should see the static time, which will not change when you open the page again sometime later.

The current static time is: 11/26/1999 10:19:46 PM 

time_client.html: A client scripting page displaying the time dynamically out of the client system.

<html><body>The current client time is: 
<script language="vbscript">
document.write(Date & " " & Time)
</script>
</body></html>

If you open this page with any Web browser that can execute VBScript statements, like MS Internet Explorer (IE) 5, you will see the current time of the client system. The displayed time will change when you open the page again sometime later.

The current client time is: 11/26/1999 10:26:08 PM 

time_server.asp: A server scripting (ASP) page displaying the time dynamically out of the server system. File name extension ".asp" is needed to inform Web server to be ready to execute the embedded script statements.

<%@ language="vbscript"%>
<html><body>The current server time is: 
<%
response.write(Date & " " & Time)
%>
</body></html>

Since an ASP page needs a Web server to execute the script statements, you need to copy this page to the document directory of the IIS server:

copy time_server.asp \inetpub\wwwroot

If you now open this page with IE 5 at http://localhost/time_server.asp, you will see the current of the server system. The displayed time will change when you open the page again sometime later.

The current server time is: 11/26/1999 10:43:32 PM 

Notice that I am using the same scripting language, VBScript, for both time_clien.html and time_server.asp. But the syntaxes of defining the block of script statements are different.

Last update: 2002.

Table of Contents

 About This Book

ASP (Active Server Pages) Introduction

 What Is ASP (Active Server Pages)

Static, Client Scripting and Server Scripting Pages

 IIS (Internet Information Services) 5.0

 MS Script Debugger

 VBScript Language

 ASP Built-in Run-time Objects

 ASP Session

 Creating and Managing Cookies

 Managing Sessions with and without Cookies

 scrrun.dll - Scripting Runtime DLL

 Managing Response Header Lines

 Calculation Speed and Response Time

 ADO (ActiveX Data Object) DLL

 Working with MS Access Database

 Guest Book Application Example

 References

 PDF Printing Version