Popular science: server side, user browser side and data storage

Popular science: server side, user browser side and data storage

1. What is server side?

An analogy: Imagine you are dining in a restaurant. You sit at the table and order a menu. The kitchen is the server side of the restaurant and is responsible for food preparation. The waiter is the bridge between you and the kitchen, taking your order to the kitchen and then bringing the food to your table.

Actually: The server side is like the kitchen of this restaurant. It is a powerful computer that stores the website's code, database and other resources. When you enter a URL in the browser and click Enter, the browser will send a request to the server, and the server will return corresponding data according to the request, such as web page content, pictures, etc.

2. What is the user browser?

An analogy: Back to the restaurant scene, the menu in your hand is like the browser you use. You select what you want to order from the menu, the waiter (browser) passes your selection to the kitchen (server), and finally the food (web content) is brought to you.

Actually: The user browser is the browser software running on your computer, mobile phone or other device, such as Chrome, Firefox, etc. It is the window through which you interact with the Internet. It is responsible for sending requests to the server and presenting the data returned by the server to you in a visual way to form the appearance of a web page.

3. How is data stored between the two?

During website interaction, data is transferred between the server and the user's browser through requests and responses.

  • Request process: When you enter a URL in the browser, click a link or submit a form, the browser will send a request to the server to obtain a certain page or resource.

  • Response process: After receiving the request, the server processes the corresponding logic, packages the required data into a response, and sends it back to the browser. This response contains the HTML, CSS, JavaScript and other files of the web page, as well as other possible data.

  • Data storage: After the browser receives the response, it will parse the information and render the web page on your device. Some data, such as images and style sheets, may be cached by the browser so that they can load faster the next time you visit the same page.

4. Why do we need server side and browser side?

  1. Division of labor and cooperation: The server side is responsible for processing data, logic and storage, and the browser side is responsible for presenting the data in a user-friendly way.

  2. Global access: The server side stores website data worldwide, and users can access this data from anywhere through a browser.

  3. Personalized experience: The browser renders web pages so that users can interact with the website and obtain personalized information and services.

Guess you like

Origin blog.csdn.net/qq_51447496/article/details/135001792