Home > Backend Development > PHP Tutorial > 想请教下,把用户名放入session再把session id 放入 cookie,和直接把用户名放入 cookie 有啥区别?

想请教下,把用户名放入session再把session id 放入 cookie,和直接把用户名放入 cookie 有啥区别?

WBOY
Release: 2016-06-23 13:11:42
Original
1105 people have browsed it

最近在做网站登录页面,看了很多关于安全登录的帖子,看到最多的方法是吧用户名放入session再把session id 放入 cookie。这和直接把用户名放入cookie有啥不一样啊?那不成这样就加密了?


回复讨论(解决方案)

cookie 在客户端
session 在服务端
从保护隐私上讲,显然后者优于前者

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