<bdo id='TjmhR'></bdo><ul id='TjmhR'></ul>
    <i id='TjmhR'><tr id='TjmhR'><dt id='TjmhR'><q id='TjmhR'><span id='TjmhR'><b id='TjmhR'><form id='TjmhR'><ins id='TjmhR'></ins><ul id='TjmhR'></ul><sub id='TjmhR'></sub></form><legend id='TjmhR'></legend><bdo id='TjmhR'><pre id='TjmhR'><center id='TjmhR'></center></pre></bdo></b><th id='TjmhR'></th></span></q></dt></tr></i><div id='TjmhR'><tfoot id='TjmhR'></tfoot><dl id='TjmhR'><fieldset id='TjmhR'></fieldset></dl></div>

      1. <legend id='TjmhR'><style id='TjmhR'><dir id='TjmhR'><q id='TjmhR'></q></dir></style></legend>

        <tfoot id='TjmhR'></tfoot>

        <small id='TjmhR'></small><noframes id='TjmhR'>

      2. 防止 Xmlhttprequest 的重定向

        时间:2023-10-14

          <small id='NzTmZ'></small><noframes id='NzTmZ'>

        • <i id='NzTmZ'><tr id='NzTmZ'><dt id='NzTmZ'><q id='NzTmZ'><span id='NzTmZ'><b id='NzTmZ'><form id='NzTmZ'><ins id='NzTmZ'></ins><ul id='NzTmZ'></ul><sub id='NzTmZ'></sub></form><legend id='NzTmZ'></legend><bdo id='NzTmZ'><pre id='NzTmZ'><center id='NzTmZ'></center></pre></bdo></b><th id='NzTmZ'></th></span></q></dt></tr></i><div id='NzTmZ'><tfoot id='NzTmZ'></tfoot><dl id='NzTmZ'><fieldset id='NzTmZ'></fieldset></dl></div>
            <legend id='NzTmZ'><style id='NzTmZ'><dir id='NzTmZ'><q id='NzTmZ'></q></dir></style></legend>
                  <tbody id='NzTmZ'></tbody>
                  <bdo id='NzTmZ'></bdo><ul id='NzTmZ'></ul>
                  <tfoot id='NzTmZ'></tfoot>
                  本文介绍了防止 Xmlhttprequest 的重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  是否可以在发送 XMLHttpRequest-s 时阻止浏览器跟随重定向(即取回重定向状态码并自己处理)?

                  Is it possible to prevent the browser from following redirects when sending XMLHttpRequest-s (i.e. to get the redirect status code back and handle it myself)?

                  推荐答案

                  不按照XMLHttpRequest 对象的 W3C 标准(已添加重点):

                  Not according to the W3C standard for the XMLHttpRequest object (emphasis added):

                  如果响应是 HTTP 重定向:

                  If the response is an HTTP redirect:

                  如果 Location 标头传达的 URL 的来源是同一个来源与 XMLHttpRequest 来源和重定向不违反无限循环预防措施,透明在观察的同时遵循重定向同源请求事件规则.

                  If the origin of the URL conveyed by the Location header is same origin with the XMLHttpRequest origin and the redirect does not violate infinite loop precautions, transparently follow the redirect while observing the same-origin request event rules.

                  他们考虑在未来发布:

                  本规范不包括以下功能正在考虑用于未来版本本规范:

                  This specification does not include the following features which are being considered for a future version of this specification:

                  • 禁用以下重定向的属性;

                  但 最新 规范不再提及这一点.

                  but the latest specification no longer mentions this.

                  这篇关于防止 Xmlhttprequest 的重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:获取 JQuery ajax 请求进度的最干净的方法是什么 下一篇:从 XHR 请求中获取 BLOB 数据

                  相关文章

                  最新文章

                  <tfoot id='7puBt'></tfoot>

                    <bdo id='7puBt'></bdo><ul id='7puBt'></ul>

                      <small id='7puBt'></small><noframes id='7puBt'>

                    1. <legend id='7puBt'><style id='7puBt'><dir id='7puBt'><q id='7puBt'></q></dir></style></legend>
                    2. <i id='7puBt'><tr id='7puBt'><dt id='7puBt'><q id='7puBt'><span id='7puBt'><b id='7puBt'><form id='7puBt'><ins id='7puBt'></ins><ul id='7puBt'></ul><sub id='7puBt'></sub></form><legend id='7puBt'></legend><bdo id='7puBt'><pre id='7puBt'><center id='7puBt'></center></pre></bdo></b><th id='7puBt'></th></span></q></dt></tr></i><div id='7puBt'><tfoot id='7puBt'></tfoot><dl id='7puBt'><fieldset id='7puBt'></fieldset></dl></div>