Page 1 of 1

Are you aware of the defer attribute?

Posted: Fri Apr 24, 2009 10:06 pm
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?

Re: Are you aware of the defer attribute?

Posted: Sat Apr 25, 2009 12:09 pm
by kaszu
Unfortunately, defer is supported only in Internet Explorer right now
Same written here