久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='D3pAX'></bdo><ul id='D3pAX'></ul>
  • <small id='D3pAX'></small><noframes id='D3pAX'>

    <legend id='D3pAX'><style id='D3pAX'><dir id='D3pAX'><q id='D3pAX'></q></dir></style></legend>

    1. <i id='D3pAX'><tr id='D3pAX'><dt id='D3pAX'><q id='D3pAX'><span id='D3pAX'><b id='D3pAX'><form id='D3pAX'><ins id='D3pAX'></ins><ul id='D3pAX'></ul><sub id='D3pAX'></sub></form><legend id='D3pAX'></legend><bdo id='D3pAX'><pre id='D3pAX'><center id='D3pAX'></center></pre></bdo></b><th id='D3pAX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='D3pAX'><tfoot id='D3pAX'></tfoot><dl id='D3pAX'><fieldset id='D3pAX'></fieldset></dl></div>

        <tfoot id='D3pAX'></tfoot>

      1. Service Worker 可以響應同步的 XHR 請求嗎?

        Can Service Workers respond to synchronous XHR requests?(Service Worker 可以響應同步的 XHR 請求嗎?)
          <tbody id='AdUT6'></tbody>

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

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

                <legend id='AdUT6'><style id='AdUT6'><dir id='AdUT6'><q id='AdUT6'></q></dir></style></legend>
                • 本文介紹了Service Worker 可以響應同步的 XHR 請求嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想使用 Service Worker 來增強現有網站.特別是,我想通過讓 Service Worker 在實際資源不可用時使用占位符資源響應請求來添加更好的離線支持.這種方法一直有效,但我遇到了障礙.站點中有幾個地方使用 同步 XHR 請求來加載某些資源,而我的 Service Worker 在 Chrome 中沒有接收到它們的事件.(請不要建議消除同步 XHR 請求.這是可取的,但超出了范圍.)

                  I would like to use Service Workers to enhance an existing web site. In particular, I would like to add better offline support by having Service Workers respond to requests with placeholder resources when the actual resources are not available. This approach had been working, but I've encountered an obstacle. There are a few places in the site where synchronous XHR requests are used to load certain resources, and my Service Worker doesn't receive events for them in Chrome. (Please don't suggest eliminating synchronous XHR requests. That's desired, but out-of-scope.)

                  Service Worker 是否可以響應同步 XHR 請求?我可以想象這實現起來很復雜,如果不支持它會理解的.W3C 服務工作者規范(工作草案) 和WHATWG Fetch Specification (Living Standard),但我還沒有完成破譯.我希望能解釋一下規范如何描述是否應支持這一點,和/或對有關指定或實施此行為的討論的任何引用.

                  Is it supposed to be possible for a Service Worker to respond to synchronous XHR requests? I could imagine this being complicated to implement, and would understand if it wasn't supported. A "correct" answer should exist between the W3C Service Workers Specification (Working Draft) and the WHATWG Fetch Specification (Living Standard), but I haven't finished deciphering them. I would appreciate an explanation of how the specifications describe whether or not this should be supported, and/or any references to discussions about specifying or implementing this behaviour.

                  推薦答案

                  理論上

                  是的,Service Worker 應該能夠響應同步 XHR 請求.這在規范中沒有明確說明,但是沒有例外會導致同步 XHR 請求被區別對待,并且 W3C Web 平臺測試 (WPT) 套件有一個測試用例來驗證它是否受支持:wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html.

                  從 2019 年 1 月起,Service Worker 可以在 Firefox 和 Edge 中響應同步 XHR 請求,但不能在 Chrome 或 Safari 中響應.Chrome 計劃很快添加支持,但我們不知道 Safari 是否會這樣做.

                  As of January 2019, service workers can respond to synchronous XHR requests in Firefox and Edge, but not in Chrome or Safari. Chrome is planning to add support soon, but we don't know if Safari ever will.

                  提供最新的瀏覽器支持矩陣 在 WPT.fyi.您可以在自己的瀏覽器中運行 WPT 測試用例 https://w3c-test.org/service-workers/service-worker/fetch-request-xhr-sync.https.html.

                  An up-to-date browser support matrix is available at WPT.fyi. You can run the WPT test case in your own browser at https://w3c-test.org/service-workers/service-worker/fetch-request-xhr-sync.https.html.

                  這篇關于Service Worker 可以響應同步的 XHR 請求嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

                      • <bdo id='zZDus'></bdo><ul id='zZDus'></ul>
                        1. <tfoot id='zZDus'></tfoot>
                        2. <i id='zZDus'><tr id='zZDus'><dt id='zZDus'><q id='zZDus'><span id='zZDus'><b id='zZDus'><form id='zZDus'><ins id='zZDus'></ins><ul id='zZDus'></ul><sub id='zZDus'></sub></form><legend id='zZDus'></legend><bdo id='zZDus'><pre id='zZDus'><center id='zZDus'></center></pre></bdo></b><th id='zZDus'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zZDus'><tfoot id='zZDus'></tfoot><dl id='zZDus'><fieldset id='zZDus'></fieldset></dl></div>

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

                              <tbody id='zZDus'></tbody>

                            <legend id='zZDus'><style id='zZDus'><dir id='zZDus'><q id='zZDus'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 日本精品国产 | 久久久久久久久久久蜜桃 | 在线观看免费观看在线91 | 精品一区二区三区在线观看 | 亚洲精品在线免费观看视频 | 91精品国产日韩91久久久久久 | 成人精品视频免费 | 黄色免费看 | av黄色片在线观看 | 国产精品2 | 日韩影院在线观看 | 手机在线一区二区三区 | 国产精品久久久久久久久久久久久 | 日韩中文一区二区 | 国产精品国产a | 不卡一区二区在线观看 | 午夜亚洲 | 亚洲精品一区在线 | 午夜综合 | www.黄色在线观看 | 精品av| 中文字幕在线一区二区三区 | 激情 亚洲| 久久久久久国产精品免费免费狐狸 | 天天弄| 精品久久一区二区三区 | 亚洲色欲色欲www | 国产露脸国语对白在线 | 自拍亚洲 | 男女羞羞视频网站 | 狠狠操在线 | 国产精品成人一区二区三区夜夜夜 | 国产精品久久久久久久久久久免费看 | 久草在线 | 亚洲精品无 | 日本在线一区二区三区 | 国产99久久久国产精品 | 久久久久亚洲视频 | 在线观看中文字幕 | 尤物在线视频 | 中文字幕日韩专区 |