开发者

Signing in on a website ? how does the server manage it?

开发者 https://www.devze.com 2023-04-08 23:52 出处:网络
I am developing a site where access to certain pages might require the user to sign in. (he/she writes his username and password)

I am developing a site where access to certain pages might require the user to sign in. (he/she writes his username and password)

if the user has successfully signed in he/she can then access this pages.

How does the server know that this is the case ?

Does it figure the IP address o开发者_C百科f the sender when he/she establish the connection ? Does it set up a timeout variable on its side so to say: 'you have been disconnected because your activity was idle for 10 minutes' ???

Many websites have this abilities on I just don't know how this is done.

Can somebody explain ?

Thanks,


The most common solution is to use cookies. You could store session data or unique identifiers in the cookies, then your app would check the contents during each request.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号