JavaScript based

I was instructed to create an extremely heavy JavaScript site, which, of course, should be compatible with feedback, as well as work with pad devices, dynamically resize, etc.

Does anyone have any tips on how to help with code reliability? Currently, a lot happens when the DOM is ready. For instance. graphs are scaled, event events are defined, etc.

However, if the file is slow or the user stops loading, the DOM ready is not always executed, so that the images do not change correctly or some other Javascript function to execute.

In most cases, everything works flawlessly, but there are some weird times with a network connection that cause several β€œrandom” problems.

I would like to hear some thoughts on improving reliability.

+5
source share
2 answers

Download all the content via JavaScript.

Thus, you can make sure that all the necessary libraries are loaded before the application is displayed. You can also use a good loading screen if it is not a fast download and may detect loading problems. Of course, this is only for web applications that absolutely must use JavaScript.

+4
source

To limit the possibility that someone will stop loading, you can start by profiling your page, including javascript, and see where everything goes slowly.

, , , , .

, , .

, , , , , , IMO.

+1

All Articles