Will SESSIONID change after one request?

WBOY
Release: 2016-08-29 08:50:50
Original
3470 people have browsed it

During the interview, the examiner asked about session synchronization. My answer was that it can be stored in SQL,

At this time, the examiner said that if A obtains sessionid twice, the session record in the database will be modified at the same time when operating again,

The data is inconsistent at this time.

Then the question is, when the client obtains a sessionid and performs an operation, will it modify the original session record?

Reply content:

During the interview, the examiner asked about session synchronization. My answer was that it can be stored in SQL,

At this time, the examiner said that if A obtains sessionid twice, the session record in the database will be modified at the same time when operating again,

The data is inconsistent at this time.

Then the question is, when the client obtains a sessionid and performs an operation, will it modify the original session record?

If the session is still valid, it will not be regenerated.

For example, if you log in as a member, you will log out when it expires.

In addition, if you clear the client cookies, the session will be lost. Session is implemented with the help of cookies

When making an http request, no matter how many sessionids are specified in the http header, only one session can be operated in the end. If the specified sessionid is illegal, a new session will be automatically created

The session will not change during its validity period

The session time limit can be configured in the php.ini file. Within the valid time limit and the client does not clear the cookie, the session ID remains unchanged.

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