It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes JS function with 'defer'... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JS function with Watch "JS function with New topic
Author

JS function with 'defer'...

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What exactly the 'defer' is?

I have heard two things about it:

1. The JS function with 'defer' is called at the end, after completion of the whole document (page).

2. Browser doesn't wait for completion of JS function with 'defer'. It continues the execution of rest of the things. Not clear, how it happens? (threading???)

Please clear my doubt.

Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Not sure why anyone would use it, but scroll to the bottom of this ro read the whole thing:

http://www.quirksmode.org/js/placejs.html

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JS function with 'defer'...
 
Similar Threads
JSP in Javascript
how to get reset to work after form submit in JSP?
Disable an image anchor
function junction
Secure mode - insecure mode browser notification