Home > Web Front-end > HTML Tutorial > Analysis of methods of accessing the server in html (picture and text)

Analysis of methods of accessing the server in html (picture and text)

不言
Release: 2018-08-10 17:29:50
Original
1917 people have browsed it

The content of this article is about the analysis (pictures and text) of the method of accessing the server in HTML. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

The first is the case of a single server, the second is the case of a cluster server;

The first case is the case of red pointing, The html requests the servlet. After querying the database for verification, the string is returned through the response. On the html side, a local cookie is established. When other pages on the homepage access the server, the string and session are obtained from the local cookie for verification;

The second case is the one pointed by yellow. When there are multiple servers, HTML sends an access request to the database for verification. If the verification is successful, a unique string assembled by key-value will also be returned. However, it is not stored in the server's session, but is stored separately in a key-value type database redis. When other pages on the homepage request verification, it directly retrieves the string from the redis database for verification. Note that the session object is terminated when the entire browser is closed, while the local cookie is cleared from the cache after a certain period of time. Of course, this time can be set by yourself.

Related recommendations:

What are the main structures of html document production?

#htmlHow to achieve text line wrapping? (code example)

The above is the detailed content of Analysis of methods of accessing the server in html (picture and text). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template