1.

Where is the external JavaScript placed in the case of lazy loading?(a) After window.onload event(b) Before window.onload event(c) In the header tag(d) In the HTML tagI have been asked this question in unit test.Enquiry is from Lazy Loading in portion Invocation and Performance Navigation of JavaScript

Answer»

Right choice is (a) After window.onload EVENT

The EXPLANATION: LAZY LOADING is a kind of loading in which we don’t need our JavaScript code to be available as soon as the page LOADS. When we don’t need our JavaScript code to be available as soon as the page loads, we can script-load our external JavaScript after the window.onload event.



Discussion

No Comment Found

Related InterviewSolutions