async vs defer attributes - Growing with the Web
vendredi 17 juillet 2015 à 16:47les liens du Colibri 17/07/2015
When should I use what?
Typically you want to use async where possible, then defer then no attribute. Here are some general rules to follow:
If the script is modular and does not rely on any scripts then use async.
If the script relies upon or is relied upon by another script then use defer.
If the script is small and is relied upon by an async script then use an inline script with no attributes placed above the async scripts.
Pratique pour bien saisir la différence
(Permalink)
Typically you want to use async where possible, then defer then no attribute. Here are some general rules to follow:
If the script is modular and does not rely on any scripts then use async.
If the script relies upon or is relied upon by another script then use defer.
If the script is small and is relied upon by an async script then use an inline script with no attributes placed above the async scripts.
Pratique pour bien saisir la différence
(Permalink)