KEMBAR78
Table 1 - Summary of Client-Side and Server-Side Scripting | PDF | Dynamic Web Page | Active Server Pages
0% found this document useful (0 votes)
60 views2 pages

Table 1 - Summary of Client-Side and Server-Side Scripting

The web server processes ASP scripts through the ASP engine. The ASP engine processes the ASP scripts and returns HTML to the browser. The browser then displays the HTML. The web server determines whether to use the ASP engine based on the file extension - .asp files trigger the ASP engine while .html and .htm files do not. Server-side scripts are processed on the server before being sent to the client, while client-side scripts are processed by the browser after being received.

Uploaded by

Hemant Gohil
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views2 pages

Table 1 - Summary of Client-Side and Server-Side Scripting

The web server processes ASP scripts through the ASP engine. The ASP engine processes the ASP scripts and returns HTML to the browser. The browser then displays the HTML. The web server determines whether to use the ASP engine based on the file extension - .asp files trigger the ASP engine while .html and .htm files do not. Server-side scripts are processed on the server before being sent to the client, while client-side scripts are processed by the browser after being received.

Uploaded by

Hemant Gohil
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

The web server is not only responsible for processing HTML tags but also the ASP scripts.

The
ASP engine, installed on the web server, is responsible for processing ASP scripts. Because the
browser can only display HTML compatible text, it is the responsibility of ASP engine to
process the ASP scripts and send the results back as HTML text to the client. In other words, the
Web server sends HTML text, part of which may be the result of the ASP scripts.

You might be thinking how the Web server can determine whether to call ASP engine or not.
You should recall from your HTML experience that HTML files have the .html or .htm
extension. Similarly, .asp extension is used for ASP scripts. An .asp file extension indicates to
the Web server to call the ASP engine. HTML tags inside an ASP file are processed by the ASP
engine; however, an html file (meaning a file that ends with .htm or .html) containing ASP code
won't run the ASP code!

Once the Web server sends the results to the client, it is the client's browser responsibility to
display HTML text. Again, the client's browser only receives HTML text. This can be
confirmed, for an asp file, by viewing the source code in the browser window. Note server-side
scripts are processed before a page is downloaded on a browser, and client-side scripts are
processed after a page has been downloaded. When we are writing ASP scripts, we are writing
pages for server-side processing. Table 1 summarizes the differences between client and server
side scripting.

Table 1 - Summary of Client-side and Server-side Scripting


 It is the client's responsibility to process client-side scripts. The
client-side scripts are not processed by the Web-server.
Client-side  Client-side scripts are processed after a Web page has been
Scripting downloaded onto the browser.
 Client-side scripting is useful for validating user's input.

 A web server is responsible for processing ASP scripts and


returning output to the client.
Server-side  The server-side scripting is done before a page is downloaded on
Scripting the browser.
 ASP scripts is a server-side technology.

The following provides a breif summary of the steps involved in processing ASP files:

1. A web browser requests an ASP file


2. The web server recives the request and loads the ASP file.
3. The server executes the code inside the ASP file. Any output from this processed ASP
code is sent to the browser in HTML format, along with any other HTML content.

Because Active Server Pages is a server-side technology, it offers number of notable advantages:
 ASP code remains on the server. Because ASP code does not leave the server, the user
does not learn about how the page is built. This provides a measure of security of your
ASP code and other files used in conjunction with your ASP code.
 ASP is a stable and matured technology. Microsoft, third-party vendors, and developers,
are some of the players providing support (i.e., tools, components, scripts, discussion
boards, etc.) for the ASP technology.
 An ASP file can use databses or other files available to the web server to produce the
desired output.
 Server-Side vs. Client-Side Scripting

 When you create a dynamic html page the code that makes the changes to the web page must be run in
one of two places. It can be client-side code executed by the user's web browser, or it can be server-side
code executed by the server. There are advantages and disadvantages to using one over the other, and a
well-planned mix of the two can have a dramatic effect on your web page.

The advantages of server-side scripting are many. Because all of the server side code is executed before
the HTML is sent to the browser, your code is hidden. Server-side code is also the only choice if you want
to access files and directories on the local machine. Server-side code is also browser independent.
Because the HTML code returned by the server is simple HTML, you do not have to worry about the
version of browser the client is using. The disadvantage to server-side scripting is that the server must
use valuable resources to parse each page it sends out. This could slow down your web site.

Client-side scripting can be very useful. The major advantage is that each web browser uses its own
resources to execute the code found on the web page. This eases the burden on the server. The
disadvantages are that you can not prevent the user from seeing your code and that you can not use
client-side code to access local files, directories, or databases.

By designing your web site to take advantage of the strengths and weaknesses of both client-side and
server-side scripting, you can protect your code and get maximum performance.

You might also like