For a simple website visit to us, the technology involved:
1. When the user accesses the browser, the browser sends an HTTP request to the server;
2. The server receives the HTTP request, the WEB server carries on the corresponding preliminary processing, uses the server script to generate the page;
3. Server scripts (leveraging the Web Framework) invoke local and client data to generate pages;
4.Web Server will generate the page as the body of the HTTP response, based on different processing results generated HTTP header, sent back to the client;
5. The client (browser) receives the HTTP response, usually the first request to get the HTTP response in the body is the HTML code, so the HTML code to start parsing;
6. The parsing process encountered resources on the referenced server (additional CSS, JS code, pictures, audio and video, attachments, etc.), and then send a request to the Web server, the Web server found the corresponding file, sent back;
7. The browser parses the contents of HTML and uses the resulting CSS code for further rendering, and the JS code may also handle the appearance;
8. When the user interacts with the page (click, hover, etc.), the JS code responds to this, adding special effects and animations;
9. In the process of interaction may need to request or submit additional data to the server (partial refresh, similar to the new message notification of Weibo), generally not jump is through the JS code (in response to an action or timing) to the Web server to send a request, Web server The server script is used to process (generate resource or write data), the resource is returned to the client, the client uses the resulting resources to achieve dynamic effects or other changes.
10. The above is generally a small site more common models, large sites in order to solve the problem of scale will have a lot of processing, each link will have some subtle differences, the middle will also use a variety of tools to reduce the pressure on the server, improve efficiency, convenient daily maintenance ~
A simple website access process