I have observed a rather strange anomaly in a web application.
Tech stack:
Front-End: ReactJS
Back-End: .NET Core application + Kestrel
Behavior
The root HTML page of the application loads several key JS files required for creating the web app.
For some reason its possible that a given file of, say, 500 KB loads about halfway and is then executed.
An error can be seen in the console that an exception occurred on line so and so, indicating that the file has not loaded completely and is therefore corrupt.
Also, if this happens once for a user, on page refresh the browser will reuse the incomplete file from cache.
I know it would be extremely helpful if I could provide additional logs/network call headers etc but I do not have access to such at the moment.
I am guessing that the files are being served in some strange way as I would assume a browser should be aware of the total file size of the resource its requesting for, so it should be able to know when it does not load completely.