failed to load response data

I have some troubles to start my WebApp with Chrome (not always).

My webApp is a simple Javascript App and it’s loaded using HTTPs. The server providing the WebApp resources is using a self signed certificate that is not trusted by Chrome (same for Firefox. ).

When a user starts for the first time the WebApp (or after cleaning the Chrome’s cache) using an URL like https://mywebapp:8443/ui the user gets a message that the website is not trusted (ERR_CERT_AUTHORITY_INVALID) but the user can continue (it’s the expected behavior).

Next, there’s the issue: Chrome starts loading my webApp by getting the index.html and then the .css but it’s unable to get the .js that contains the Javascript code of my webApp.

In the Chrome Development tool, I can see the response of the HTTPs request to get the .js file is «Failed to load response data».

I don’t understand why there’s this error with Chrome (it never happens with Firefox). Next, if I reload the page in Chrome, the WebApp is successfully loaded and displayed.

I can reproduce this issue when I’m cleaning the cache in Chrome. If I’m not cleaning the cache the WebApp continues to work even after a Chrome restart.

Can it be due to the self signed certificates? What can be the reason of this issue during the first start? Why it happens only with Chrome?

При открытии панели разработчика (f12) и нажатии на network появляется 4 иконки index.html, bootstrap.min.css%22,bootstrap.min.js, jquery.min.js.

Иконка bootstrap.min.css%22 горит красным, а при открытии выдает failed to load response data. Что с этим делать?

у вас тут видимо неправильно задано название подключаемого файла

смотрите в коде index где подключается файл почему там %22 на конце

Пытаюсь написать прослойку для проксирования всех запросов на сервер.
На сервере
app.use(‘/api/*’, router);

В роутере в свиче разбираю методы.

Запрос с клиентской части

Chrome request and response:

Firefox request and response

GET запрос отрабатывает и всё отлично отдаётся. А вот POST запрос отрабатывает, но в ответ ничего не посылается. В браузере в консолт «Network» — Failed to load response data.
Подскажите, в чём может быть проблема?

Оцените статью