Questions about saving user logon

Source: Internet
Author: User
Saving user login question? When the user closes the browser, the login status remains unchanged after the page is re-opened, using cookies or sesssion. The problem is that the session is used to verify the user's login. after the browser is closed, the session does not work. Or put the session into the memory. However, if the cookie is used for implementation, after the browser is closed, the user login is still remembered. Is it unsafe to do so. for example, if I copy a cookie file, it does not mean that the user login will not be saved?
When the user closes the browser, the login status remains unchanged after the page is re-opened, using cookies or sesssion.
The problem is that the session is used to verify the user's login. after the browser is closed, the session does not work. Or put the session into the memory. However, if the cookie is used for implementation, after the browser is closed, the user login is still remembered. Is this unsafe? for example, if I copy a cookie file, this does not mean that I do not need to log on. After thinking for a long time, I still don't understand. Is it because I think the direction is wrong or my thoughts are wrong!

Please explain how to implement it. It is required that not only the browser should be closed, but the login should be maintained and the data security should be ensured. please advise me, Cainiao.
------ Solution --------------------


Copying a cookie file can be searched.

However, you can add interference factors in the encryption, such as the browser UserAgent and the user's IP address.

You can see the encryption method in DISCUZ, in function_core.php authcode ();

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.