Home php教程 php手册 php用户登录验证cookie与session区别

php用户登录验证cookie与session区别

May 25, 2016 pm 04:54 PM

本文章来给各位同学介绍一下关于php用户登录验证cookie与session性能比较吧,有需要了解的同学可参考参考。

查看了不少资料。也想了很多,总结一下!

php高性能高流量用户登录验证机制用cookie 还是 session?

一、cookie 区别session?

cookie客户端;

session存在服务器端;

session安全。

二、session在分布式上存在难点。

这一点memcache可能会解决一些。但如果不用memcache,解决起来问题大.

三、session在生存周期上不如cookie方便。

四、用cookie的最大问题是服务器需要二次验证。如果用session验证,不如用session,查表也是一样。

      这里如果cookie不需要服务器端二次验证,则效率会大幅提高。 估计discuz就是这种思路。

五 session和cookie结合使用问题。这又分成上述各点。


本文地址:

转载随意,但请附上文章地址:-)

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)