How to save user login information ?, Save User Login

Source: Internet
Author: User

How to save user login information ?, Save User Login

Currently, we have three solutions:

1. cookie

2. session

3. Database

 

 

First: cookie

Put it on the client to reduce the pressure on the server, but it is not safe!

Second: session

It is secure on the server side. However, as the number of users increases, the load on the server increases and session loss still exists!

Third: Database

Save the user login information to the database and set the timeout time. Each time you perform an operation, you need to update the data in the login information table in time!

Advantage: Secure, login information will not be lost!

Disadvantage: the server is under too much pressure!

 

 

I don't know what you think? Please kindly advise!

Related Article

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.