简体   繁体   中英

Failed to load resource: net::ERR_EMPTY_RESPONSE http://test.com

Im working on a chrome extension which sends XMLHttpRequest to a URL, gets response in JSON format, parse the response and shows list of records. Its working fine. The problem is when user performs any action and go back to listing section, system follows the same process sends the XMLHttpRequest request but everytime i get this response:

Failed to load resource: net::ERR_EMPTY_RESPONSE http://test.com

First time when i load the extension everything works fine, after that it always show the above mentioned error.

Its a two HTML pages extension. One for signin and other for listing. Im using ajax to toggle divs based on results.

Now the Weird part. Only 3 of my users have this problem so far. Two of them have mac and one windows 8.1. For all other users it works perfectly fine.

I have run across the same problem. I developed a very AJAX intensive application, which works perfectly on the localhost. Using the identical machine to test the live site (hosted by GoDaddy) pressing a button to activate an AJAX function is intermittently accepted.

If I repeatedly press the button, and watch what is going on in the developer tools, I see the Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. indicated by the "(failed)":

在此处输入图片说明

On the eighth attempt in the above picture, you can see it finally worked. The best way to verify if this is what is happening to you is to wait 1 minute, and repeat the action. It seems that the speed of the connection is what is causing this problem, although the speed of the last error is much faster than the first success. And while I am checking other websites to verify that the internet is still "ON", this might do more with the settings in the web-browser, or the host computer. You can see that this seems to be the solution to the problem, according to this answer . But then again, this answer states to reset the network settings and restart the machine.

Other solutions point to clearing the browser's cache or disabling add-ons, but reloading or refreshing is difficult and unreliable as a solution for non-tech users. Finally, it might have something to do with the hosting server settings .

I suspect it may have something to do with the Server sensing a DDOS attack (a large number of small AJAX requests), so it temporarily blocks/ignores the request. Changing hosts (or self hosting) may be the best solution.

Im working on a chrome extension which sends XMLHttpRequest to a URL, gets response in JSON format, parse the response and shows list of records. Its working fine. The problem is when user performs any action and go back to listing section, system follows the same process sends the XMLHttpRequest request but everytime i get this response:

Failed to load resource: net::ERR_EMPTY_RESPONSE http://test.com

First time when i load the extension everything works fine, after that it always show the above mentioned error.

Its a two HTML pages extension. One for signin and other for listing. Im using ajax to toggle divs based on results.

Now the Weird part. Only 3 of my users have this problem so far. Two of them have mac and one windows 8.1. For all other users it works perfectly fine.

This is quite simple, when chosen your domain. do not chose multiple domain. Just chose a single domain during the setup wizard and you are good to go. #TG

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM