Salesqueen Software Solution

Download Free Estimation Now Click Here
Notifications
Clear all

What is the use of the attribute in JavaScript?

3 Posts
3 Users
0 Reactions
125 Views
Posts: 461
Topic starter
(@dinesha-g)
Reputable Member
Joined: 2 years ago

<defer> attribute in JavaScript

2 Replies
Posts: 52
(@chitravarsha15)
Trusted Member
Joined: 2 years ago

If the defer property is set, it indicates that the script will be downloaded concurrently with page parsing and will only be performed once page parsing is complete.

 

 

Reply
Posts: 173
(@princy)
Estimable Member
Joined: 2 years ago

By using the defer property, the browser is instructed not to wait for the script. The browser will instead keep working to build the DOM and process the HTML. When the DOM has been completely created, the script begins to operate "in the background."

Reply
Share: