How the Web worksThe web uses the client-server architecture (Client--server model), as shown in the following illustration, where clients (client) can access resources or services from another computer over a network connection, and the computer that provides the resource or service is called the server. Web clients simply have browser software installed (such as Internet Explorer, Google Chrome, Mozilla FireFox, Opera, Apple Safari ...). will be able to connect to Web servers around the world through the software to browse Web server-provided Web pages (homepage).
Dynamic Web page"Dynamic Web page" refers to the client and server side can interact, that is, the server can process the client's request in real time, and then the results to the client. Dynamic Web pages are usually accomplished through "browser-side scripts" and "server-side scripts" techniques.
browser-side scripts
Browser-side scripts refers to a small program embedded in the HTNL source code, which is executed by the browser. Both JavaScripts and vbscripts can be used to write browser-side scripts, with JavaScripts as the mainstream.
server-side scripts
When a browser requests a Web page that contains server-side scripts (with the extension. php,. asp,. aspx,. JSP,. CGI, and so on), the Web server reads the Web page from disk and executes the server-side scripts in the first place. Converts the result to an HTML Web page (. htm or. html extension), and then passes it to the browser and closes the connection, and the browser resolves it to the interface when it receives the page. Common server-side scripts CGI (Common Gateway Interface): CGI is a standard interface for transmitting information between server-side programs, while CGI programs are scripts that conform to standard interfaces, usually written by Perl,python or C (with the extension. CGI) JSP (Java Server pages): JSP is a Dynamic Web page technology provided by Sun, which can embed Java programs in HTML raw files and be executed by the Web server (with the extension. JSP). ASP (Active Server Pages): An ASP program is a scripts that is executed on a Microsoft IIS Web server, typically written by vbscripts or javascripts (with an. ASP extension), A new generation of ASP.net programs is written by powerful visual Basic, Visual C #, Microsoft J #, and so on. NET compatible languages (with an. aspx extension) PHP (Php:hypertext preprocessor):P HP programs are scripts that are executed on Web servers such as Apache, Microsoft IIS, and across platforms (Unix,freebsd,windows,linux, MacOS ... )