'Javascript cannot be loaded in time

I'm running a flask web app and i getting an error like this: get (some js source) net::err_invalid_http_response

But the problem is when I trying to get the page the scripts that not working are different, sometimes all the scripts are working.

When I putting the scripts on the head of html it's loading better but still not all the scripts are working, but when I slowing down the internet to 3G in devtools all the scripts are running

I don't know what to do with it and I couldn't find nothing about it.

Im am using the standard script markup in html: <script src="some/js"></script>

Thanks in advance!



Solution 1:[1]

I added the type attribute to the script tag and all start working so the code looks like that: <script type="text/javascript src="js/source"></script>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FreazeMood