Какво прави "async"?

bganonymous

Registered
Здравейте! Имам следния JS код. Чудя се за какво точно служи "async"? :)
Код:
<script type="text/javascript" src="//copypoison.com/cp.js" async></script>
 
bganonymous каза:
Здравейте! Имам следния JS код. Чудя се за какво точно служи "async"? :)
Код:
<script type="text/javascript" src="//copypoison.com/cp.js" async></script>
Първо, това не е javascript, a e HTML.
Второ, гугъл веднага ти казва. Единственото, което се изисква от теб, е да цъкнеш първия резултат.

За да не е off-t,
" каза:
Note: There are several ways an external script can be executed:

If async="async": The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing)
If async is not present and defer="defer": The script is executed when the page has finished parsing
If neither async or defer is present: The script is fetched and executed immediately, before the browser continues parsing the page
 

Back
Горе