
How does ASP differ from client-side scripting? |
The Browser Receives only HTML
1:
<HTML>
2: <Head>
3: <SCRIPT LANGUAGE=JavaScript>
4:
<!
..>
5: alert(Hello world)
6: // .. >
7:
</SCRIPT>
8: </HEAD>
9: <BODY>
10: welcome to my web
page!
11: </BODY>
12: </html>
Analysis:
The code in listing includes raw HTML and it is nothing more than a static HTML file. If the contents of listing were entered into a web page named client side scripting.htm, the entire contents would be sent to the browser when the client requests the web page. The browser, when rendering the HTML, would display a message box when the alert method was reached in the output of listing and viewed through a browser. You can have client side scripting code in an ASP page because client side scripting is HTML code as far as the Web server is concerned .
New term
Server side scripts are scripts that execute on the web server. These scripts are processed and their output is sent to the client.
Method of Client-side scripting and Serverside Scripting
Client-side scripting : A client-side script is not processed at all by the web server, and it is processed only by the client. It is the clients responsibility to execute all client side scripts.
Server side scripting : Server side scripting are processed completely on the web server. The client does not receive any code from server- side scripts: rather the client receives just the output of the server-side scripts. Client-side scripts and server side scripts cannot interact with one another because the client side scripts are executed on the client, after the server side scripts have finished processing completely.
It
is most important to understand that client side scripts and server side scripts
are two completely separate entities.
_______________________________________________________________________
FREE Subscription
Subscribe
to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.
Note
: We never rent, trade, or sell my email lists to
anyone.
We assure that your privacy is respected
and protected.
Visit .NET Programming Tutorial Homepage
______________________________________________________