在Chrome中,有多少重定向是“太多”? [英] In Chrome, how many redirects are "too many"?
本文介绍了在Chrome中,有多少重定向是“太多”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通常情况下,当脚本有重定向循环时,我们会在Google Chrome中发现一个错误,指出
Often, when a script has a redirect loop we get an error in Google Chrome that says
错误310(net :: ERR_TOO_MANY_REDIRECTS ):
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
有多少重定向太多了?
推荐答案
Google Chrome 17.0.963.56最多允许20个重定向,如此PHP脚本所测试:
Google Chrome 17.0.963.56 allows a maximum of 20 redirects, as tested with this PHP script:
<?php
$redirect = (isset($_GET['redirect'])) ? $_GET['redirect'] : 0;
header("Location: redirects.php?redirect=" . ($redirect + 1));
?>
尝试使用Chrome浏览器时,出现错误 310
打开 redirects.php?redirect = 21
,这意味着第一个 20
重定向成功。
Chrome aborts with error 310
when trying to open redirects.php?redirect=21
, which means that the first 20
redirects were successful.
这篇关于在Chrome中,有多少重定向是“太多”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文