PROJET AUTOBLOG


Shaarli - Les discussions de Shaarli

Archivé

Site original : Shaarli - Les discussions de Shaarli

⇐ retour index

async vs defer attributes - Growing with the Web

vendredi 17 juillet 2015 à 16:47

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)