
001 JSJ Asynchronous Programming
JavaScript Jabber
00:00
Is There a Better Way to Do That?
AJ: A really common case where this is done on purpose is the browser, people, ad companies,. They would like to be notified when you leave the page. And they do not want to have to follow the normal rules. So what they do is they register an on-on loadbook and then sit in a spin loop forever waiting for that Ajax request to make it. AJ: It's a terrible approach. Instead of using set timeout, people should use that timeout.
Play episode from 34:06
Transcript


