(a) Common server-side scripting language, php,jsp,asp.
Like our normal browsing web based on a BS model, it is also just a browser (browser)-consistent CS mode. Our browser as a client, when clicking on the link or enter the address, to the destination host to send html,ftp and so on service request, then the destination host according to the request type, the request content responds. This kind of original AIM service form is ubiquitous in all network communication modes.
Server scripting is simple, and it should occur when you submit and process a form to implement dynamic content. Imagine a medium-sized website with about thousands of link addresses, and you can't add a page to every address. The server script then abstracts logic from the underlying, combining pages with the same framework but with different content. The most important thing is to separate the logical processing from the data. As a result, multiple users submit a request, and everyone enjoys a common logical approach, but because the forms I submit are different and the corresponding processing varies, so the return content is different.
(ii) client script, corresponding to Javascript,perl and so on.
In fact, client-side scripting from JavaScript has been emphasized, especially the advent of Ajax technology, so that clients are valued.
Obviously, the server data are stored in the database, each query is a link to the database, often database links than database queries more time-consuming. To avoid this, web designers can abstract simple logic, such as a one-time reading of the overall data, and then the data into the client (browser) process, so that the next need not re-establish the link, I can get data from their own machine. There is no need for the server to communicate frequently. The purpose of client-side scripting is obvious, which avoids duplication of redundant links and can relieve the pressure on the server (you don't have to ask the server to query the database multiple times).
(c) Difference
Server scripts run on the server, you can never see the contents of the server script, only the script interpreter sent back the HTML code, the browser to its disk receive.
Client script runs out of the server and does not perform database operations directly. It implements the simple logic on the client.
Ajax technology makes client-side scripting a different and powerful one, allowing the client language to encapsulate database operations, allowing users to implement fully detached database operation requests in an interface.
Reprinted from http://blog.163.com/the_springwater/blog/static/13718142220104623424397/
Server-side scripting language and client scripting language