What does the attribute defer/async do when added to the script tag?



What does the attribute defer/async do when added to the script tag?..

Answer / Shashank Braham Dev Narayan

The 'defer' attribute tells the browser to download and parse the script simultaneously while parsing HTML, but execute it after the document has been parsed. The 'async' attribute tells the browser to download and execute the script as soon as possible without waiting for other scripts or parsing to finish.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

Is javascript frontend or backend?

1 Answers  


You have an asp. Net web application running on a web-farm that does not use sticky sessions - so the requests for a session are not guaranteed to be served the same machine. Occasionally, the users get error message validation of view state mac failed. What could be one reason that is causing this error?

1 Answers  


What does trim stand for?

1 Answers  


What is the purpose of local variables?

1 Answers  


How do you know if a set of points is a function?

0 Answers  


Is a hash table an array?

1 Answers  


What is whitespace in javascript?

1 Answers  


What is the difference between ‘let’ and ‘const’?

1 Answers  


What is a javascript code?

1 Answers  


What are decodeuri() and encodeuri() functions in javascript?

1 Answers  


how to run the servlet in tomcat

1 Answers   DELL, TCS,


What is the use of blur function?

1 Answers  


Categories