Home Backend Development PHP Tutorial 写入cookie导致浏览器反问不了服务器,该如何处理

写入cookie导致浏览器反问不了服务器,该如何处理

Jun 13, 2016 am 11:46 AM
application cookie http nbsp

写入cookie导致浏览器反问不了服务器
浏览器端不断刷新请求一个php页面(这个页面访问一次会重新写入一次cookie),刷新到一定程度了(大概10-20次)就访问不了服务器了,要清除cookie才能重新访问

访问不了的时候的Request headers如下:
GET http://XXX/test.php HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36

访问不了的时候,请求是发不出去的,好像是很努力在读本地的cookie,就是读不到一样。

------解决方案--------------------
服务器端应该有限制
------解决方案--------------------
cookie验证问题
受限页面验证cookie有问题,所以跳转至登陆页面
登陆页面判断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 Article Tags

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)

10 Ways to Adjust Brightness on Windows 11 10 Ways to Adjust Brightness on Windows 11 Dec 18, 2023 pm 02:21 PM

10 Ways to Adjust Brightness on Windows 11

How to turn off private browsing authentication for iPhone in Safari? How to turn off private browsing authentication for iPhone in Safari? Nov 29, 2023 pm 11:21 PM

How to turn off private browsing authentication for iPhone in Safari?

Where are cookies stored? Where are cookies stored? Dec 20, 2023 pm 03:07 PM

Where are cookies stored?

Where are the cookies on your computer? Where are the cookies on your computer? Dec 22, 2023 pm 03:46 PM

Where are the cookies on your computer?

Understand common application scenarios of web page redirection and understand the HTTP 301 status code Understand common application scenarios of web page redirection and understand the HTTP 301 status code Feb 18, 2024 pm 08:41 PM

Understand common application scenarios of web page redirection and understand the HTTP 301 status code

Where are the mobile cookies? Where are the mobile cookies? Dec 22, 2023 pm 03:40 PM

Where are the mobile cookies?

Detailed explanation of where browser cookies are stored Detailed explanation of where browser cookies are stored Jan 19, 2024 am 09:15 AM

Detailed explanation of where browser cookies are stored

How to implement HTTP streaming using C++? How to implement HTTP streaming using C++? May 31, 2024 am 11:06 AM

How to implement HTTP streaming using C++?

See all articles