1.

How to lazy load images?(a) Remove the rel attribute(b) Remove the src attribute(c) Make rel = src(d) Make src = relThe question was asked during an interview.I would like to ask this question from Lazy Loading in chapter Invocation and Performance Navigation of JavaScript

Answer»

Correct answer is (b) Remove the SRC ATTRIBUTE

Best explanation: The way we WOULD lazy load images would be to ALTER the HTML of the page to remove the contents of the src attribute of each image. We could just move the contents of the src attribute to an attribute in the image tag of our own design, maybe the rel attribute.



Discussion

No Comment Found

Related InterviewSolutions