This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8912 - Why can't defer be used on inline scripts? If the script execution is slow (which can include loading of preceeding style sheets), the browser will have to wait until it can continue parsing and start downloading subsequent external resources.
Summary: Why can't defer be used on inline scripts? If the script execution is slow (w...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-10 00:15 UTC by contributor
Modified: 2010-10-04 14:55 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2010-02-10 00:15:41 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#script

Comment:
Why can't defer be used on inline scripts? If the script execution is slow
(which can include loading of preceeding style sheets), the browser will have
to wait until it can continue parsing and start downloading subsequent
external resources.

Posted from: 81.216.154.159
Comment 1 Henri Sivonen 2010-02-10 07:50:15 UTC
Honoring defer on inline scripts was deemed to be a problem due to existing content calling document.write() there.
Comment 2 Ian 'Hixie' Hickson 2010-02-14 11:18:59 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Browsers already parse ahead of inline <script>s optimistically, so it doesn't stop that. As Henri says, this was considered (in fact, it was even specced for a while) and ended up being removed because of some really strange interactions between <script>, the parser, document.write(), and innerHTML.