My website uses session to log in, why do I need to log in again after clearing the browser data? The session is present on the server.

Source: Internet
Author: User

Answer one:

You clear the browser data, the equivalent of the cookie is also clear, then your sessionid is not, so you ask again when the server can not be based on the sessionid you carry to get the corresponding session, so that need to re-login.

Answer two:

The session is passed a session_id value at each request to save the conversation, and there are two ways to pass it, one is to carry the cookie through each request, or one is passed through a URL, if you PHP is set by a cookie, So as long as the original cookie is deleted under the corresponding domain name, the server will automatically generate a new session_id, that is, lost the original session, as for your problem, I think it is the wrong way to delete, since it is a developer, then use the browser's open tools, The above can display all cookies under the current domain name, or delete cookies, and the browser recommends chrome!

My website uses session to log in, why do I need to log in again after clearing the browser data? The session is present on the server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.