pbootcms网站模板|织梦模板|网站源码|jquery建站特效-html5模板网

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

    • <bdo id='uSzGn'></bdo><ul id='uSzGn'></ul>

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

      <tfoot id='uSzGn'></tfoot>

        <legend id='uSzGn'><style id='uSzGn'><dir id='uSzGn'><q id='uSzGn'></q></dir></style></legend>
      1. XHR HEAD 請求是否有可能不遵循重定向 (301 302)

        Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))

          • <bdo id='ti8dw'></bdo><ul id='ti8dw'></ul>

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

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

                <legend id='ti8dw'><style id='ti8dw'><dir id='ti8dw'><q id='ti8dw'></q></dir></style></legend>
                • 本文介紹了XHR HEAD 請求是否有可能不遵循重定向 (301 302)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  是否可以發送 xhr HTTP HEAD 請求以僅獲取第一個請求的標頭響應,而不像重定向一樣自動遵循 301、302?我只對獲取 url 的新位置感興趣.示例:

                  Is it possible to send an xhr HTTP HEAD request to only get header response for the first request and not automatically follow 301, 302 like redirects? I'm only interested in getting the new location of the url. Example:

                  var xhr = new XMLHttpRequest();
                  xhr.onreadystatechange = function(data) {
                      if (xhr.readyState == 4) {
                          if (xhr.status == 301 || xhr.status == 302) {
                              // Get new location url don't GET it
                          }
                      }
                  };
                  xhr.open('HEAD', url, true);
                  xhr.send();
                  

                  http://www.w3.org/TR/XMLHttpRequest/#infrastructure-for-the-send-method 似乎指定應遵循請求,有沒有辦法阻止它?

                  http://www.w3.org/TR/XMLHttpRequest/#infrastructure-for-the-send-method seems to specify that requests should be followed, is there a way to stop this?

                  推薦答案

                  沒有,這不是你可以阻止的暴露行為.

                  There isn't, this isn't exposed behavior you can stop.

                  這是因為 您已經鏈接的規范,指定的行為是 XmlHttpRequest 應該透明地遵循重定向...不幸的是,在幕后,而不是你可以阻止的方式.

                  It's because of the spec you linked already, the specified behavior is that XmlHttpRequest should transparently follow redirects...under the covers unfortunately, and not in a way you can prevent.

                  這種方式可以嘗試讓事情變得更容易,如果資源移動等...但是在設計和制定規范時,所有這些重定向服務都不存在.只是沒有強烈需要任何其他行為或能力來阻止它,我認為隨著網絡上的重定向越來越多,我們不會看到添加的能力,但誰知道每個瀏覽器何時會支持它.

                  It's this way to try and make things easier, if resources move, etc...but when it was designed and the spec laid out, all these redirection services weren't out there. There just wasn't a strong need for any other behavior or ability to prevent it, I think with as many redirects hitting the web not we'll see the ability added, but who knows when every browser would support it.

                  這篇關于XHR HEAD 請求是否有可能不遵循重定向 (301 302)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

                      <tfoot id='BcYQn'></tfoot>

                        <bdo id='BcYQn'></bdo><ul id='BcYQn'></ul>

                            <tbody id='BcYQn'></tbody>

                          <i id='BcYQn'><tr id='BcYQn'><dt id='BcYQn'><q id='BcYQn'><span id='BcYQn'><b id='BcYQn'><form id='BcYQn'><ins id='BcYQn'></ins><ul id='BcYQn'></ul><sub id='BcYQn'></sub></form><legend id='BcYQn'></legend><bdo id='BcYQn'><pre id='BcYQn'><center id='BcYQn'></center></pre></bdo></b><th id='BcYQn'></th></span></q></dt></tr></i><div class="57zzhbz" id='BcYQn'><tfoot id='BcYQn'></tfoot><dl id='BcYQn'><fieldset id='BcYQn'></fieldset></dl></div>
                            <legend id='BcYQn'><style id='BcYQn'><dir id='BcYQn'><q id='BcYQn'></q></dir></style></legend>

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

                            主站蜘蛛池模板: 一体化污水处理设备,一体化污水设备厂家-宜兴市福源水处理设备有限公司 | 干法制粒机_智能干法制粒机_张家港市开创机械制造有限公司 | 手机游戏_热门软件app下载_好玩的安卓游戏下载基地-吾爱下载站 | 重庆中专|职高|技校招生-重庆中专招生网 | 【化妆品备案】进口化妆品备案流程-深圳美尚美化妆品有限公司 | CE认证_产品欧盟ROHS-REACH检测机构-商通检测 | 服务器之家 - 专注于服务器技术及软件下载分享 | 经济师考试_2025中级经济师报名时间_报名入口_考试时间_华课网校经济师培训网站 | 阳光模拟试验箱_高低温试验箱_高低温冲击试验箱_快速温变试验箱|东莞市赛思检测设备有限公司 | 手术示教系统-数字化手术室系统-林之硕医疗云智能视频平台 | 免费B2B信息推广发布平台 - 推发网 | 深圳美安可自动化设备有限公司,喷码机,定制喷码机,二维码喷码机,深圳喷码机,纸箱喷码机,东莞喷码机 UV喷码机,日期喷码机,鸡蛋喷码机,管芯喷码机,管内壁喷码机,喷码机厂家 | 吸音板,隔音板,吸音材料,吸音板价格,声学材料 - 佛山诺声吸音板厂家 | Q361F全焊接球阀,200X减压稳压阀,ZJHP气动单座调节阀-上海戎钛 | 万家财经_财经新闻_在线财经资讯网| 微动开关厂家-东莞市德沃电子科技有限公司 | 上海佳武自动化科技有限公司 | 智能案卷柜_卷宗柜_钥匙柜_文件流转柜_装备柜_浙江福源智能科技有限公司 | Akribis直线电机_直线模组_力矩电机_直线电机平台|雅科贝思Akribis-杭州摩森机电科技有限公司 | 氧化锆陶瓷_氧化锆陶瓷加工_氧化锆陶瓷生产厂家-康柏工业陶瓷有限公司 | 电磁铁_小型推拉电磁铁_电磁阀厂家-深圳市宗泰电机有限公司 | 南京欧陆电气股份有限公司-风力发电机官网| 半容积式换热器_北京浮动盘管换热器厂家|北京亿丰上达 | 蜘蛛车-高空作业平台-升降机-高空作业车租赁-臂式伸缩臂叉装车-登高车出租厂家 - 普雷斯特机械设备(北京)有限公司 | 列管冷凝器,刮板蒸发器,外盘管反应釜厂家-无锡曼旺化工设备有限公司 | 颗粒机,颗粒机组,木屑颗粒机-济南劲能机械有限公司 | 体视显微镜_荧光生物显微镜_显微镜报价-微仪光电生命科学显微镜有限公司 | 工程管道/塑料管材/pvc排水管/ppr给水管/pe双壁波纹管等品牌管材批发厂家-河南洁尔康建材 | 气弹簧定制-气动杆-可控气弹簧-不锈钢阻尼器-工业气弹簧-可调节气弹簧厂家-常州巨腾气弹簧供应商 | 水压力传感器_数字压力传感器|佛山一众传感仪器有限公司|首页 | 厌氧反应器,IC厌氧反应器,厌氧三相分离器-山东创博环保科技有限公司 | 焊接减速机箱体,减速机箱体加工-淄博博山泽坤机械厂 | 气体检测仪-氢气检测仪-可燃气体传感器-恶臭电子鼻-深国安电子 | 台湾阳明固态继电器-奥托尼克斯光电传感器-接近开关-温控器-光纤传感器-编码器一级代理商江苏用之宜电气 | 电磁铁_推拉电磁铁_机械手电磁吸盘电磁铁厂家-广州思德隆电子公司 | 砂石生产线_石料生产线设备_制砂生产线设备价格_生产厂家-河南中誉鼎力智能装备有限公司 | 渗透仪-直剪仪-三轴仪|苏州昱创百科| 绿萝净除甲醛|深圳除甲醛公司|测甲醛怎么收费|培训机构|电影院|办公室|车内|室内除甲醛案例|原理|方法|价格立马咨询 | 防堵吹扫装置-防堵风压测量装置-电动操作显示器-兴洲仪器 | 福兰德PVC地板|PVC塑胶地板|PVC运动地板|PVC商用地板-中国弹性地板系统专业解决方案领先供应商! 福建成考网-福建成人高考网 | 河南中整光饰机械有限公司-抛光机,去毛刺抛光机,精密镜面抛光机,全自动抛光机械设备 |