Are you aware of the defer attribute?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply

Are you aware of the defer script element attribute?

Yes!
3
60%
No!
2
40%
Heard of it... But don't really know much about it?
0
No votes
 
Total votes: 5

User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Are you aware of the defer attribute?

Post by JellyFish »

Are you aware that there is an attribute called defer for the script element? I just found out about this and supposedly what it does is explained here.
hunlock.com wrote:By adding a defer attribute to your <script> tag you are telling the browser that it can wait until it's done setting up the rest of the page before doing anything with the Javascript block...
Does this take the place of the custom ready event in most javascript libraries (i.e. $.ready(function(){...}) from jquery)?

My only other question is, does it work cross-browser; how's the support for it?

Interesting, what are your thoughts?
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Are you aware of the defer attribute?

Post by kaszu »

Unfortunately, defer is supported only in Internet Explorer right now
Same written here
Post Reply