Name

defer — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

Whether the browser should proceed with rendering regular HTML content without looking for the script to generate content as the page loads. This value needs to be set in the SCRIPT element’s tag at run-time. When this property is set to true by the addition of the DEFER attribute to the tag, the browser does not have to hold up rendering further HTML content to parse the content of the SCRIPT element in search of document.write( ) statements. Changing this property’s value after the document loads does not affect the performance of the script or browser.

Example

document.all.myScript.defer = "true"

Value

Boolean value: true | false.

Default

false

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.