What can cause Chrome to provide net :: ERR_FAILED on cached content on the server on localhost?

I am creating a web server and trying to verify something. The server runs on localhost:888 , and the first time the web application is launched, everything works. But if I try to reload the page, the failure of XmlHttpRequest fails. By setting breakpoints in the server code, I can verify that requests never appear.

This is not a connection failure, since the connection is successful for the first time. The fact that it succeeds once and then fails later means that it may be related to caching, but nothing exists in the server code that sets the cache-control header. So I tested it by putting the server on the actual web server. For the first time, it was all time to plunge; the second time everything loads instantly, so this is definitely related to the cache

This is a configurable server running on top of http.sys (without IIS), and it seems that everything is cached by default and then does not load from it on subsequent launches, but only when my server is running on a local host; on the Internet, it works fine. As far as I can tell, net::ERR_FAILED is the general message “something went wrong and we don’t have any useful information for you” in Chrome, so I’m kind of stuck here. Does anyone know what could be causing this?

+8
source share
4 answers

The most likely reason is that you have incorrectly written your AppCache manifest. For example: in the file /a/b/cache.html you refer to the cache.appcache manifest file, but in the cache.appcache file you declare:

CACHE:

/cache.html

which is wrong.

you should write:

CACHE:

/a/b/cache.html

Hope this can help you.

+3
source

I encountered this error on my local host (Monday morning) when requesting one of my virtual hosts. It turned out that on another virtual host, an incomplete debugging action was still being performed (unfinished business from my Friday week :)), which did not allow Apache to serve files for another request. This resulted in a net::ERR_FAILED in my browser console.

Hope this can be helpful for others coming here.

+1
source

I met a similar problem.

my server lives in K8S. when a client uses an input route to service a problematic API if there are tons of requests. the client will get the same net :: ERR_FAILED error. this is not a problem when using an external load balance.

Then I use JMeter to check the input route, it turned out to be reliable. I am testing using disable caching mode.

0
source

Disable skype and then check again.

-1
source

All Articles