What does status=canceled for a resource mean in Chrome Developer Tools?

前端 未结 30 1676
温柔的废话
温柔的废话 2020-11-22 11:13

What would cause a page to be canceled? I have a screenshot of the Chrome Developer Tools.

\"Canceled

30条回答
  •  渐次进展
    2020-11-22 11:38

    A cancelled request happened to me when redirecting between secure and non-secure pages on separate domains within an iframe. The redirected request showed in dev tools as a "cancelled" request.

    I have a page with an iframe containing a form hosted by my payment gateway. When the form in the iframe was submitted, the payment gateway would redirect back to a URL on my server. The redirect recently stopped working and ended up as a "cancelled" request instead.

    It seems that Chrome (I was using Windows 7 Chrome 30.0.1599.101) no longer allowed a redirect within the iframe to go to a non-secure page on a separate domain. To fix it, I just made sure any redirected requests in the iframe were always sent to secure URLs.

    When I created a simpler test page with only an iframe, there was a warning in the console (which I had previous missed or maybe didn't show up):

    [Blocked] The page at https://mydomain.com/Payment/EnterDetails ran insecure content from http://mydomain.com/Payment/Success
    

    The redirect turned into a cancelled request in Chrome on PC, Mac and Android. I don't know if it is specific to my website setup (SagePay Low Profile) or if something has changed in Chrome.

提交回复
热议问题