What does status=canceled for a resource mean in C

2018-12-31 19:40发布

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

Canceled Resource

This happens often but not every time. It seems like once some other resources are cached, a page refresh will load the LeftPane.aspx. And what's really odd is this only happens in Google Chrome, not Internet Explorer 8. Any ideas why Chrome would cancel a request?

23条回答
梦醉为红颜
2楼-- · 2018-12-31 20:10

Here is another case of request being canceled by chrome, which I just encountered, which is not covered by any of answers up there.

In a nutshell
Self-signed certificate not being trusted on my android phone.

Details
We are in development/debug phase. The url is pointing to a self-signed host. The code is like:

location.href = 'https://some.host.com/some/path'

Chrome just canceled the request silently, leaving no clue for newbie to web development like myself to fix the issue. Once I downloaded and installed the certificate using the android phone the issue is gone.

查看更多
君临天下
3楼-- · 2018-12-31 20:11

Another place we've encountered the (canceled) status is in a particular TLS certificate misconfiguration. If a site such as https://www.example.com is misconfigured such that the certificate does not include the www. but is valid for https://example.com, chrome will cancel this request and automatically redirect to the latter site. This is not the case for Firefox.

Currently valid example: https://www.pthree.org/

查看更多
骚的不知所云
4楼-- · 2018-12-31 20:12

I have embedded all types of font as well as woff, woff2, ttf when I embed a web font in style sheet. Recently I noticed that Chrome cancels request to ttf and woff when woff2 is present. I use Chrome version 66.0.3359.181 right now but I am not sure when Chrome started canceling of extra font types.

查看更多
几人难应
5楼-- · 2018-12-31 20:13

In my case, I found that it is jquery global timeout settings, a jquery plugin setup global timeout to 500ms, so that when the request exceed 500ms, chrome will cancel the request.

查看更多
冷夜・残月
6楼-- · 2018-12-31 20:15

I had the exact same thing with two CSS files that were stored in another folder outside my main css folder. I'm using Expression Engine and found that the issue was in the rules in my htaccess file. I just added the folder to one of my conditions and it fixed it. Here's an example:

RewriteCond %{REQUEST_URI} !(images|css|js|new_folder|favicon.ico)

So it might be worth you checking your htaccess file for any potential conflicts

查看更多
深知你不懂我心
7楼-- · 2018-12-31 20:15

I got this error in Chrome when I redirected via JavaScript:

<script>
    window.location.href = "devhost:88/somepage";
</script>

As you see I forgot the 'http://'. After I added it, it worked.

查看更多
登录 后发表回答