Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Which attribute is used to specify that the script is executed when the page has finished parsing ( only for external scripts )

  2. A.

     parse

    B.

     a sync

    C.

     defer

    D.

     type

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    In order to load a page, the browser must parse the contents of all script tags, which adds additional time to the page load) By minimizing the amount of JavaScript needed to render the page, and deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page.


Be The First To Comment