1.

Which of the following statements is false?(a) async and defer attributes of script tag execute before the DOMContentLoaded event(b) defer executes each script sequentially(c) async executes each script when it is ready(d) all older browsers supports async attributeThis question was posed to me during an online interview.The query is from Web Browsers in division HTML Fundamentals of HTML

Answer»

Correct choice is (d) all OLDER BROWSERS SUPPORTS async attribute

The best explanation: In async attribute, the script is EXECUTED asynchronously with the rest of the page (the script will be executed while the page continues the parsing). Defer, the Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded EVENT. Older browsers doesn’t support async attribute.



Discussion

No Comment Found

Related InterviewSolutions