4 ms·
The spec agrees with you, but even MDC does not: https://developer.mozilla.org/en/DOM/DOM_event_reference/DOMContentLoaded https://developer.mozilla.org/en/DOM/
by cramforce 14y ago
The spec agrees with you, but even MDC does not:
https://developer.mozilla.org/en/DOM/DOM_event_reference/DOMContentLoaded https://developer.mozilla.org/en/DOM/DOM_event_reference/DOM...
DOMContentLoaded, in all important browsers, does block to wait for CSS.
Manipulating the DOM before this event both increases the chance to make changes before first-paint (decreases "jigger" on page load) and gives you the chance to request more resources earlier.
- kevincennis 14y agoWow, that's a total surprise. I guess I never really noticed this because my scripts are always included so much later in the document than my CSS.
- bzbarsky 14y agoDOMContentLoaded does not block to wait for CSS in Firefox.