Does anyone know exactly what the defer attribute for the script tag is? I read that it tells the browser to load the page first (once the body tag is fully loaded) and then load the contained <script>.

If so then how does it cope with cached scripts? Say for example a <script> has already been loaded then the page is accessed again, will the <script> contents be executed right away since the contents do not have to be downloaded?

Also, if you do not have a src attribute (the contents are on the page and not in a separate file) then does the defer attribute really do anything?

I am aware that it's in the HTML specification and that it's not a MSonly thing. But this is the first time I've ever seen the defer attribute, so I don't think it's really mainstream. All of my scripts that load up when the page is loaded are triggered by window.onload and since lately I use mootools, then they are loaded after window.onDomReady.

I tried using the defer attribute with mozilla and it didn't seem to work.

How exactly does this feature work?

------- EDIT -------

Correction This feature seems to be MSonly even though it's in the HTML specification. This feature isn't really very useful for any other browsers.