Is it a good thing to async everything?? | Sololearn: Learn to code for FREE!

+1

Is it a good thing to async everything??

like async every css and js when render the page..

8/21/2017 6:37:24 AM

Basri Basren

2 Answers

New Answer

+2

Not all the coding need to run in async. Use async programming when a single program thread handles many concurrent operations such as server request and response operations. Async programming also required when UI codes in event triggering modes. Apply async programming to any non-blocking operations such as Ajax request and callback.

+1

you can use "defer" too, if you need every thing is been loaded before starting the script working. http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html