所有主要浏览器允许的HTTP重定向最大数量是多少? [英] What is the maximum number of HTTP redirections allowed by all major browsers?

查看:404
本文介绍了所有主要浏览器允许的HTTP重定向最大数量是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个网站,该网站分布在许多服务器上,在某些页面中,我最多需要连续链接多达4个重定向.我尝试了几种浏览器(firefox,chrome,IE),但似乎工作正常.

I am designing a web site, spread across many servers, and there are pages where I need up to chain up to 4 redirections in a row. I tried a few browsers (firefox, chrome, IE) and it seems to work fine.

显然,Firefox的默认限制为连续20个重定向,Chrome的默认限制为20,而IE8的限制似乎为10重定向.

Apparently, Firefox's default limit is 20 redirections in a row, Chrome's default seems to be 20, and IE8's limit seems to be 10 redirections.

所有主要浏览器允许的HTTP重定向最大数量是多少?是10点吗?

What is the maximum number of HTTP redirections allowed by all major browsers? Is it 10?

修改:

为什么我需要4个重定向?基本上,用户处于热点地区,她尝试访问google.com,这是一个本地俘虏门户,可捕获请求并将用户重定向(#1)到本地服务器.本地服务器检查有关用户的某些信息,但是如果本地没有该数据,它将把用户重定向(#2)到中央网站.如果用户已经登录到该中央网站,则她将被重定向(#3)到另一台服务器(视用户而定,存在不同的门户).最后,服务器检查用户的权限,如果她具有适当的权限,则将最终重定向到本地访问控制器,以获取对适当服务的访问权(#4).相信我,我已尽力删除重定向,但我看不到可以对其进行优化的地方.

Why do I need 4 redirections? Basically, the user is in a hotspot, she tries to go to (say) google.com, there is a local captive portal that captures the request and redirects (#1) the user to a local server. The local server checks some things about the user, but if it does not have the data locally, it redirects (#2) the user to the central web site. If the user is already logged in to this central Web site, she gets redirected (#3) to another server (there are different portals depending on the user). Finally, the server checks the user's rights, and if she has the appropriate rights, there is a final (#4) redirection to the local access controller, in order to get access to the appropriate service. Believe me, I tried my best to remove redirections, but I cannot see where this can be optimized.

推荐答案

4重定向应该在所有主流浏览器中都有效.但是,请考虑减少数量,以便为用户提供更快的体验.每次重定向都需要用户和服务器之间的往返(如果重定向到其他服务器,则需要创建一个新的连接).总的来说,延迟会很长,可能会惹恼您的用户.

4 redirections should work in all major browsers. However, consider reducing the number to give users a faster experience. Each redirection requires a round trip between the user and the server (and requires creating a new connection, if it's redirecting to a different server). In total, the latency will be significant, likely annoying your users.

这篇关于所有主要浏览器允许的HTTP重定向最大数量是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆