DEV Community

Discussion on: Build a lightweight Internet Detect Feature with VanillaJS

Collapse
 
ojanti profile image
John Ojanti Itebu

Thanks a lot.
Can you expatiate more on this point
--> ...a response time of few seconds can disrupt some applications ...
Also, yea. Timestamp is a better choice 👍

Collapse
 
belinde profile image
Franco Traversaro

In case of bad design of asynchronous calls with some degree of parallelization or sequentiality. A quick example because I'm writing on mobile: call A, then after one second call B, and the application assume that A will respond before B. On a bad connection A and B could return in the same instant, or even B before A. A poor coding choice could create an invalid state in the application. I'm speaking theoretically, but I've seen similar problems some months ago.