Home » delay javascript .loading .js empty stub functions programming coding download speed javascripts function delayed load

JavaScript: Delay Loading

You can make your content display faster if you delay or defer the loading of your external JavaScript files. JavaScripts are executed as they are loaded. Any external JavaScripts referenced within the head of your XHTML documents must be executed before any body content is displayed. One way around this is to delay the loading of your external JavaScript by using empty “stub” functions, and redefining these functions later on.

Read more