“CAUTION: provisional headers are shown” in Chrome debugger

前端 未结 30 2949
滥情空心
滥情空心 2020-11-22 11:52

I noticed a strange caution message when looking at downloaded resources using Google chrome inspector (F12):

Caution provisional headers a

相关标签:
30条回答
  • 2020-11-22 12:22

    In my case it was just a false set path in to a resource (svg / img)

    0 讨论(0)
  • 2020-11-22 12:24

    I've had this come up very recently (today in fact) where I've had an AJAX call go out to the server and Chrome fires off the "Caution: Provisional headers are shown." In the server side PHP scripting, there are MySQL queries that can be pretty much instant or take a few seconds depending on the given scenario. My server response isn't sent back to the browser until the queries are completed. I've found I get this error only when time consuming queries (up to a few seconds total) are being done and prevent the response from being sent back.

    My scenario involves the very rare possibility of having to alter a table by adding/removing hundreds of columns for weather model output...hence the response lag from iterating through a loop of ALTER TABLE queries.

    0 讨论(0)
  • 2020-11-22 12:24

    "Caution: provisional headers are shown" message can be shown when website hosted on HTTPS invokes a calls to WebApi hosted on HTTP. You can check all if all your Api's are HTTPS. Browser prevents to do a call to insecure resource. You can see similar message in your code when use FETCH API to domain with HTTP.

    Mixed Content: The page at 'https://website.com' was loaded over HTTPS, but requested an insecure resource 'http://webapi.com'. This request has been blocked; the content must be served over HTTPS.

    0 讨论(0)
  • 2020-11-22 12:28

    This can also happen (for cross-origin requests only) because of a new feature called site isolation

    This page details the issue and a work-around. Which is to go to chrome://flags/#site-isolation-trial-opt-out in chrome and change that setting to "Opt-out" and reload chrome.

    It's a known issue. However that page says it's fixed in chrome 68, but I'm running chrome 68 and I still have the issue.

    0 讨论(0)
  • 2020-11-22 12:29

    I ran this issue when I tried to load main.js for require js for the second time after I made changes as a result from error . I just turned on in Developer Tools Settings "Disable Cache (When DevTools is Open)" . and that did the charm.

    0 讨论(0)
  • 2020-11-22 12:29

    I got this error when I tried to print a page in a popup. The print dialog was show and it still waiting my acceptance or cancellation of the printing in the popup while in the master page also was waiting in the background showing the message CAUTION provisional headers are shown when I tried to click another link.

    In my case the solution was to remove the window.print (); script that it was executing on the <body> of the popup window to prevent the print dialog.

    0 讨论(0)
提交回复
热议问题