RunOpus 5.5repeat 2
Orchestrator-workers on async vs defer on <script>
claude-opus-5-5__orchestrator-workers__research-script-loading__r2
Score
0.917
- Cost
- $1.02
- + $0.111 judging
- Latency
- 1m 52s
- setup 0.0s, grading 4.7s
- Turns
- 44
- Tool calls
- 38
- Subagents
- 3
- Tokens in / out
- 344k / 21k
- 263,826 read from cache
Did the design run?
- Run completed: heldharness.run-completedThe environment was built, the architecture returned and grading finished, none of them throwing.
- No API failures: heldharness.apiNo model call failed at the API.
- Every call ended: heldharness.calls-endedEvery call ended with a result, or was stopped by the run's own limits.
- No harness tool denied: heldharness.harness-toolsThe sandbox guard never denied a harness tool, nor a tool the session itself offered.
- Tool servers connected: heldharness.mcp-connectedEvery tool server the harness gave a call was connected when the session started.
- No foreign tool servers: heldharness.mcp-hermeticNo call loaded a tool server the harness did not give it.
- Builtin tools: heldharness.builtin-toolsA check recorded with the run.
- Structured replies arrived: heldharness.structured-outputEvery call that asked for structured output and ran to the end got it.
- No silent fallbacks: heldharness.not-degradedNo phase fell back on a default (an empty plan, a default winner) instead of its output.
- Judge answered: heldharness.judgeAt least one grading call returned a usable verdict.
- The task was decomposed: heldorchestrator-workers.decompositionThe orchestrator’s reply was read through its schema and held at least one subtask.
- The fan-out happened: heldorchestrator-workers.fan-outEvery subtask got a worker, every worker ran, and the recorded subagent count matches.
- The synthesis wrote the answer: heldorchestrator-workers.synthesisThe final answer came from the synthesis call, not from a worker’s report standing in for it.
- Each call was shown the right tools: heldorchestrator-workers.toolsThe orchestrator and the synthesis were shown no tools and every worker the task’s full toolset.
Phases
Drawn from the phase records: timing and cost per call, no tool calls or messages.
| Phase | Duration | Cost | Turns | Tools | Model |
|---|---|---|---|---|---|
| Decompose | 18.0s | $0.048 | 2 | 0 | claude-opus-5-5 |
| Worker 1: classic-async-defer | 49.7s | $0.279 | 16 | 15 | claude-opus-5-5 |
| Worker 2: inline-and-module | 45.8s | $0.299 | 16 | 15 | claude-opus-5-5 |
| Worker 3: domcontentloaded-practic | 38.4s | $0.188 | 9 | 8 | claude-opus-5-5 |
| Synthesize | 44.1s | $0.207 | 1 | 0 | claude-opus-5-5 |
The call-by-call replay is not published for this run. Traces are large, so the repository keeps 9 of this run set’s 900 and leaves the rest out; the score, phases and final answer on this page come from the committed run record.
Runs you can replay
- A gate that blocked the right moveGated-execute · Haiku 4.5
- Three proposals beat one agentPropose-select · Haiku 4.5
- A verifier that earned its keepPlan-execute-verify · Sonnet 5.5
- A revision that did not helpPlan-execute-verify · Haiku 4.5
- The control, missing a stepSingle · Haiku 4.5
Record this cell yourself: npm run bench -- run --strategies orchestrator-workers --tasks research-script-loading --models claude-opus-5-5 --repeats 1
Score breakdown
- passStates that both async and defer let a classic script be fetched in parallel with HTML parsing, so the fetch does not block the parser, unlike a classic script with src and neither attribute.1.00weight 0.13
met, backed by verified evidence E1. “The script downloads while parsing continues.”
- passStates that a defer script executes only after the document has finished parsing, and before DOMContentLoaded fires.1.00weight 0.19
met, backed by verified evidence E11, E4. “Deferred scripts run after parsing finishes but before DOMContentLoaded, and the event waits for them.”
- passStates that an async script executes as soon as it is available, interrupting parsing if parsing is still in progress, so it may run before or after DOMContentLoaded.1.00weight 0.19
met, backed by verified evidence E1, E5, E7. “If it finishes downloading while the parser is still working, it interrupts the parser to run”
- passStates that multiple defer scripts execute in document order, while async scripts execute in the order their downloads complete, which is not predictable.1.00weight 0.19
met, backed by verified evidence E14, E15, E9, E26. “Deferred scripts run in document order (MDN, web.dev).”
- passStates that async and defer have no effect on a classic inline script (a script element without a src attribute).1.00weight 0.13
met, backed by verified evidence E19, E20, E18. “For classic inline scripts, `async` and `defer` have no effect.”
- passStates that module scripts are deferred by default, so the defer attribute has no effect on them, while the async attribute does apply to module scripts.1.00weight 0.19
met, backed by verified evidence E22, E23, E25. “Module scripts behave like deferred scripts even without the attribute, so adding `defer` changes nothing.”
Penalties
- hallucinated citationCited pages that were never opened×0.9166666666666667
1 of 6 cited URLs were never opened: https://html.spec.whatwg.org/multipage/parsing.html
Scorer metadata
- corpus
- {"version":2,"snapshot":"2026-10-01","hash":"a5d703ba820ee9c957565ac15b9f98daeac8212372d73d7658a7a6bb2bbc1978","documents":6}
- opened documents
- ["mdn-domcontentloaded","whatwg-html-scripting","mdn-script-element","webdev-optimize-resource-loading","webdev-third-party-javascript","mdn-js-modules"]
- opened by role
- {"secondary":["mdn-domcontentloaded","mdn-script-element","webdev-optimize-resource-loading","webdev-third-party-javascript","mdn-js-modules"],"primary":["whatwg-html-scripting"]}
- displayed share
- {"mdn-domcontentloaded":1,"whatwg-html-scripting":0.2744,"mdn-script-element":0.6898,"webdev-third-party-javascript":0.9618,"webdev-optimize-resource-loading":0.5234,"mdn-js-modules":0.1914}
- cited count
- 6
- verified count
- 5
- hallucinated count
- 1
- citation integrity
- 0.8333333333333334 (83%)
- hallucinated urls
- ["https://html.spec.whatwg.org/multipage/parsing.html"]
- evidence block
- true
- evidence block repaired
- false
- evidence count
- 26
- verified quote count
- 26
- verified quote rate
- 1
- evidence
- [{"url":"https://html.spec.whatwg.org/multipage/scripting.html","claim":"A classic external async script is fetched in parallel with parsing and runs as soon as it is available, possibly before parsing ends; a defer script is fetched in parallel and runs after parsing fini\n…[truncated 66 chars]","quote":"For external classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available (potentially before parsing completes). If the async attribute is not present but the defer attribute is present, then the classic \n…[truncated 219 chars]","verified":true,"document":"whatwg-html-scripting"},{"url":"https://web.dev/learn/performance/optimize-resource-loading","claim":"Scripts without async/defer block parsing and rendering until downloaded, parsed and executed; inline scripts block the parser too.","quote":"When loading <script> elements without the defer or async attributes, the browser blocks parsing and rendering until the script is downloaded, parsed, and executed. Similarly, inline scripts block the parser until the script is parsed and executed.","verified":true,"document":"webdev-optimize-resource-loading"},{"url":"https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event","claim":"Synchronous scripts in the initial markup always run before DOMContentLoaded.","quote":"The document waits for the script to execute before firing DOMContentLoaded, so you are always sure that setup logic in the listener will be executed.","verified":true,"document":"mdn-domcontentloaded"},{"url":"https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event","claim":"DOMContentLoaded waits for parsing plus deferred and module scripts, but not for async scripts.","quote":"The DOMContentLoaded event fires when the HTML document has been completely parsed, and all deferred scripts (<script defer src=\"…\"> and <script type=\"module\">) have downloaded and executed. It doesn't wait for other things like images, subframes, and async scripts to finish loading.","verified":true,"document":"mdn-domcontentloaded"},{"url":"https://web.dev/articles/efficiently-load-third-party-javascript","claim":"An async script that finishes downloading during parsing interrupts DOM building.","quote":"It also means they can interrupt DOM building if they finish downloading while the parser is still at work.","verified":true,"document":"webdev-third-party-javascript"},{"url":"https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event","claim":"MDN's note says DOMContentLoaded fires before async scripts run, which is in tension with the other sources.","quote":"DOMContentLoaded is fired after the execution of these scripts, but before the execution of scripts with async.","verified":true,"document":"mdn-domcontentloaded"},{"url":"https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event","claim":"An async script may run after DOMContentLoaded has already fired.","quote":"If it's included via <script async>, or it's dynamically injected, then by the time it executes, DOMContentLoaded has already fired.","verified":true,"document":"mdn-domcontentloaded"},{"url":"https://html.spec.whatwg.org/multipage/scripting.html","claim":"In the spec, async scripts go into an unordered set of scripts that run as soon as possible.","quote":"Each Document has a set of scripts that will execute as soon as possible, which is a set of script elements, initially empty.","verified":true,"document":"whatwg-html-scripting"},{"url":"https://web.dev/articles/efficiently-load-third-party-javascript","claim":"Async scripts are likely to run out of document order.","quote":"This means it's possible (and likely) that async scripts won't run in the order in which they appear in the HTML.","verified":true,"document":"webdev-third-party-javascript"},{"url":"https://html.spec.whatwg.org/multipage/scripting.html","claim":"Parser-inserted deferred scripts are appended to a list run once parsing finishes.","quote":"Append el to its parser document's list of scripts that will execute when the document has finished parsing.","verified":true,"document":"whatwg-html-scripting"},{"url":"https://web.dev/articles/efficiently-load-third-party-javascript","claim":"Deferred scripts run after parsing and before DOMContentLoaded.","quote":"Scripts with the defer attribute execute after HTML parsing is completely finished, but before the DOMContentLoaded event.","verified":true,"document":"webdev-third-party-javascript"},{"url":"https://web.dev/learn/performance/optimize-resource-loading","claim":"A second web.dev page loosely says defer runs at the same time as DOMContentLoaded.","quote":"Scripts loaded with async are parsed and executed immediately once downloaded, while scripts loaded with defer are executed when HTML document parsing is finished—this occurs at the same time as the browser's DOMContentLoaded event.","verified":true,"document":"webdev-optimize-resource-loading"},{"url":"https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event","claim":"Deferred scripts wait for stylesheets, and DOMContentLoaded is queued after them.","quote":"DOMContentLoaded does not wait for stylesheets to load, however deferred scripts do wait for stylesheets, and the DOMContentLoaded event is queued after deferred scripts.","verified":true,"document":"mdn-domcontentloaded"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"Deferred scripts execute in document order.","quote":"Scripts with the defer attribute will execute in the order in which they appear in the document.","verified":true,"document":"mdn-script-element"},{"url":"https://web.dev/learn/performance/optimize-resource-loading","claim":"Async may run out of order while defer runs in markup order.","quote":"Additionally, async scripts may execute out-of-order, while defer scripts are executed in the order in which they appear in the markup.","verified":true,"document":"webdev-optimize-resource-loading"},{"url":"https://html.spec.whatwg.org/multipage/scripting.html","claim":"With both attributes, async wins; defer is a fallback for legacy browsers.","quote":"The defer attribute may be specified even if the async attribute is specified, to cause legacy web browsers that only support defer (and not async) to fall back to the defer behavior instead of the blocking behavior that is the default.","verified":true,"document":"whatwg-html-scripting"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"MDN confirms async takes precedence when both are set.","quote":"If the attribute is specified with the async attribute, the element will act as if only the async attribute is specified.","verified":true,"document":"mdn-script-element"},{"url":"https://html.spec.whatwg.org/multipage/scripting.html","claim":"The spec applies the async/defer branching only to classic scripts with src and to module scripts.","quote":"If el's type is \"classic\" and el has a src attribute, or el's type is \"module\":","verified":true,"document":"whatwg-html-scripting"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"async has no effect on inline classic scripts.","quote":"Warning: This attribute must not be used if the src attribute is absent (i.e., for inline scripts) for classic scripts, in this case it would have no effect.","verified":true,"document":"mdn-script-element"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"defer has no effect on inline scripts.","quote":"Warning: This attribute must not be used if the src attribute is absent (i.e., for inline scripts), in this case it would have no effect.","verified":true,"document":"mdn-script-element"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"Inline non-module scripts run immediately before parsing continues.","quote":"Scripts without async, defer or type=\"module\" attributes, as well as inline scripts without the type=\"module\" attribute, are fetched and executed immediately before the browser continues to parse the page.","verified":true,"document":"mdn-script-element"},{"url":"https://html.spec.whatwg.org/multipage/scripting.html","claim":"defer has no effect on module scripts.","quote":"(The defer attribute has no effect on module scripts.)","verified":true,"document":"whatwg-html-scripting"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"Module scripts defer by default.","quote":"The defer attribute has no effect on module scripts — they defer by default.","verified":true,"document":"mdn-script-element"},{"url":"https://web.dev/learn/performance/optimize-resource-loading","claim":"Automatic deferral applies to inline module scripts too.","quote":"async and defer allow external scripts to load without blocking the HTML parser while scripts (including inline scripts) with type=\"module\" are deferred automatically.","verified":true,"document":"webdev-optimize-resource-loading"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"async on a module script fetches it and its dependencies in parallel and runs it as soon as available.","quote":"For module scripts, if the async attribute is present then the scripts and all their dependencies will be fetched in parallel to parsing and evaluated as soon as they are available.","verified":true,"document":"mdn-script-element"},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script","claim":"async scripts carry no ordering guarantee.","quote":"You get no guarantee that scripts will run in any specific order.","verified":true,"document":"mdn-script-element"}]
- judge unverified quotes
- 0
- judge verdicts
- [{"parallel-download":{"status":"met","support":["E1"]},"defer-timing":{"status":"met","support":["E11","E4"]},"async-timing":{"status":"met","support":["E1","E5","E7"]},"ordering":{"status":"met","support":["E14","E15","E9","E26"]},"inline-ignored":{"status":"met","support":["E19","E20","E18"]},"modules":{"status":"met","support":["E22","E23","E25"]}},{"parallel-download":{"status":"met","support":["E1"]},"defer-timing":{"status":"met","support":["E11","E4","E1"]},"async-timing":{"status":"met","support":["E1","E5","E7"]},"ordering":{"status":"met","support":["E14","E15","E9","E26"]},"inline-ignored":{"status":"met","support":["E19","E20","E18"]},"modules":{"status":"met","support":["E22","E23","E25"]}},{"parallel-download":{"status":"met","support":["E1"]},"defer-timing":{"status":"met","support":["E11","E4","E1"]},"async-timing":{"status":"met","support":["E1","E5","E7"]},"ordering":{"status":"met","support":["E14","E15","E9","E26"]},"inline-ignored":{"status":"met","support":["E19","E20","E18"]},"modules":{"status":"met","support":["E22","E23","E25"]}}]
- judge failures
- 0
- grounded weight share
- 1
Final answer
How async and defer work on <script>
The default case: no attribute
A classic <script src="…"> with neither attribute stops the parser. The browser fetches and runs the script, and only then continues parsing the page. The WHATWG spec says such a script is "fetched and evaluated immediately, blocking parsing until these are both complete" (https://html.spec.whatwg.org/multipage/scripting.html). web.dev says the same, adding that rendering is blocked too (https://web.dev/learn/performance/optimize-resource-loading). Because the parser waits for these scripts, they always run before DOMContentLoaded (https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event).
async on a classic external script
Parsing. The script downloads while parsing continues. The spec says it is evaluated "as soon as it is available (potentially before parsing completes)" (https://html.spec.whatwg.org/multipage/scripting.html). So an async script does not block parsing while it downloads. If it finishes downloading while the parser is still working, it interrupts the parser to run (https://web.dev/articles/efficiently-load-third-party-javascript).
Timing relative to DOMContentLoaded. DOMContentLoaded does not wait for async scripts (https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event). An async script can therefore run either before or after the event, depending on when it finishes downloading. The sources do not fully agree on this:
- One sentence on MDN's DOMContentLoaded page says the event fires "before the execution of scripts with async".
- Elsewhere on that same page, MDN treats
<script async>as something that may run after DOMContentLoaded. - web.dev and the spec both say an async script can run while parsing is still under way. Since DOMContentLoaded comes after parsing ends, that would put the script before the event.
My reading is that "before or after" is correct and that MDN's one-line note oversimplifies. That is an inference. None of the workers could confirm it from the spec's end-of-parsing steps, because https://html.spec.whatwg.org/multipage/parsing.html returned HTTP 404.
Order. There is no ordering guarantee. In the spec, async scripts go into an unordered "set of scripts that will execute as soon as possible", and each runs when its own download is ready. In practice, whichever script loads first runs first. web.dev calls out-of-order execution "possible (and likely)".
defer on a classic external script
Parsing. The script is fetched in parallel with parsing and never blocks the parser. The spec says it is evaluated "when the page has finished parsing" (https://html.spec.whatwg.org/multipage/scripting.html).
Timing relative to DOMContentLoaded. Deferred scripts run after parsing finishes but before DOMContentLoaded, and the event waits for them. MDN describes the order this way:
document.readyStatebecomes "interactive".- The deferred scripts run.
- DOMContentLoaded fires.
Deferred scripts also wait for stylesheets (https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event). One web.dev page loosely says this happens "at the same time as" DOMContentLoaded. A second web.dev page, and MDN, say "before", which is the more precise wording.
Order. Deferred scripts run in document order (MDN, web.dev). The spec appends each parser-inserted deferred script to the end of a list that runs once parsing finishes. The text the worker read did not state the run order in so many words, so for the spec this is a reasonable inference rather than a confirmed quote.
Both attributes on one script
async wins: the script behaves as if only async were set. defer is only there so that old browsers which support defer but not async use deferred loading instead of blocking (spec, MDN).
Inline scripts (no src)
For classic inline scripts, async and defer have no effect. The spec only applies the async/defer branching when the script is classic with a src attribute, or is a module script. MDN warns against using either attribute on inline classic scripts for this reason. An inline classic script runs immediately and blocks the parser (MDN, web.dev).
type="module" scripts
Deferred by default. Module scripts behave like deferred scripts even without the attribute, so adding defer changes nothing. The spec says "The defer attribute has no effect on module scripts", and MDN says the same. According to web.dev, automatic deferral applies to inline module scripts as well.
Timing. DOMContentLoaded waits for non-async module scripts in the same way it waits for defer scripts (MDN).
With async. Adding async changes how a module script runs. The script and all its dependencies are fetched in parallel with parsing, and the module runs as soon as everything is available, with no ordering guarantee.
Two points the workers did not confirm directly:
- No source they opened explicitly says that non-async modules keep document order. That conclusion combines two MDN statements: modules "defer by default", and deferred scripts run in document order.
- No source explicitly says that
asyncworks on inline module scripts. MDN limits its "no effect on inline scripts" warning to classic scripts, which implies it does work, and the spec's branching includes all module scripts.
Gaps in the research
- The spec's parsing page and the javascript.info articles both returned 404, so they are not cited.
{"evidence": [
{"claim": "A classic external async script is fetched in parallel with parsing and runs as soon as it is available, possibly before parsing ends; a defer script is fetched in parallel and runs after parsing finishes; with neither attribute, fetching and running blocks parsing.", "quote": "For external classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available (potentially before parsing completes). If the async attribute is not present but the defer attribute is present, then the classic script will be fetched in parallel and evaluated when the page has finished parsing. If neither attribute is present, then the script is fetched and evaluated immediately, blocking parsing until these are both complete.", "url": "https://html.spec.whatwg.org/multipage/scripting.html"},
{"claim": "Scripts without async/defer block parsing and rendering until downloaded, parsed and executed; inline scripts block the parser too.", "quote": "When loading <script> elements without the defer or async attributes, the browser blocks parsing and rendering until the script is downloaded, parsed, and executed. Similarly, inline scripts block the parser until the script is parsed and executed.", "url": "https://web.dev/learn/performance/optimize-resource-loading"},
{"claim": "Synchronous scripts in the initial markup always run before DOMContentLoaded.", "quote": "The document waits for the script to execute before firing DOMContentLoaded, so you are always sure that setup logic in the listener will be executed.", "url": "https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event"},
{"claim": "DOMContentLoaded waits for parsing plus deferred and module scripts, but not for async scripts.", "quote": "The DOMContentLoaded event fires when the HTML document has been completely parsed, and all deferred scripts (<script defer src=\"…\"> and <script type=\"module\">) have downloaded and executed. It doesn't wait for other things like images, subframes, and async scripts to finish loading.", "url": "https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event"},
{"claim": "An async script that finishes downloading during parsing interrupts DOM building.", "quote": "It also means they can interrupt DOM building if they finish downloading while the parser is still at work.", "url": "https://web.dev/articles/efficiently-load-third-party-javascript"},
{"claim": "MDN's note says DOMContentLoaded fires before async scripts run, which is in tension with the other sources.", "quote": "DOMContentLoaded is fired after the execution of these scripts, but before the execution of scripts with async.", "url": "https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event"},
{"claim": "An async script may run after DOMContentLoaded has already fired.", "quote": "If it's included via <script async>, or it's dynamically injected, then by the time it executes, DOMContentLoaded has already fired.", "url": "https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event"},
{"claim": "In the spec, async scripts go into an unordered set of scripts that run as soon as possible.", "quote": "Each Document has a set of scripts that will execute as soon as possible, which is a set of script elements, initially empty.", "url": "https://html.spec.whatwg.org/multipage/scripting.html"},
{"claim": "Async scripts are likely to run out of document order.", "quote": "This means it's possible (and likely) that async scripts won't run in the order in which they appear in the HTML.", "url": "https://web.dev/articles/efficiently-load-third-party-javascript"},
{"claim": "Parser-inserted deferred scripts are appended to a list run once parsing finishes.", "quote": "Append el to its parser document's list of scripts that will execute when the document has finished parsing.", "url": "https://html.spec.whatwg.org/multipage/scripting.html"},
{"claim": "Deferred scripts run after parsing and before DOMContentLoaded.", "quote": "Scripts with the defer attribute execute after HTML parsing is completely finished, but before the DOMContentLoaded event.", "url": "https://web.dev/articles/efficiently-load-third-party-javascript"},
{"claim": "A second web.dev page loosely says defer runs at the same time as DOMContentLoaded.", "quote": "Scripts loaded with async are parsed and executed immediately once downloaded, while scripts loaded with defer are executed when HTML document parsing is finished—this occurs at the same time as the browser's DOMContentLoaded event.", "url": "https://web.dev/learn/performance/optimize-resource-loading"},
{"claim": "Deferred scripts wait for stylesheets, and DOMContentLoaded is queued after them.", "quote": "DOMContentLoaded does not wait for stylesheets to load, however deferred scripts do wait for stylesheets, and the DOMContentLoaded event is queued after deferred scripts.", "url": "https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event"},
{"claim": "Deferred scripts execute in document order.", "quote": "Scripts with the defer attribute will execute in the order in which they appear in the document.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "Async may run out of order while defer runs in markup order.", "quote": "Additionally, async scripts may execute out-of-order, while defer scripts are executed in the order in which they appear in the markup.", "url": "https://web.dev/learn/performance/optimize-resource-loading"},
{"claim": "With both attributes, async wins; defer is a fallback for legacy browsers.", "quote": "The defer attribute may be specified even if the async attribute is specified, to cause legacy web browsers that only support defer (and not async) to fall back to the defer behavior instead of the blocking behavior that is the default.", "url": "https://html.spec.whatwg.org/multipage/scripting.html"},
{"claim": "MDN confirms async takes precedence when both are set.", "quote": "If the attribute is specified with the async attribute, the element will act as if only the async attribute is specified.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "The spec applies the async/defer branching only to classic scripts with src and to module scripts.", "quote": "If el's type is \"classic\" and el has a src attribute, or el's type is \"module\":", "url": "https://html.spec.whatwg.org/multipage/scripting.html"},
{"claim": "async has no effect on inline classic scripts.", "quote": "Warning: This attribute must not be used if the src attribute is absent (i.e., for inline scripts) for classic scripts, in this case it would have no effect.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "defer has no effect on inline scripts.", "quote": "Warning: This attribute must not be used if the src attribute is absent (i.e., for inline scripts), in this case it would have no effect.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "Inline non-module scripts run immediately before parsing continues.", "quote": "Scripts without async, defer or type=\"module\" attributes, as well as inline scripts without the type=\"module\" attribute, are fetched and executed immediately before the browser continues to parse the page.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "defer has no effect on module scripts.", "quote": "(The defer attribute has no effect on module scripts.)", "url": "https://html.spec.whatwg.org/multipage/scripting.html"},
{"claim": "Module scripts defer by default.", "quote": "The defer attribute has no effect on module scripts — they defer by default.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "Automatic deferral applies to inline module scripts too.", "quote": "async and defer allow external scripts to load without blocking the HTML parser while scripts (including inline scripts) with type=\"module\" are deferred automatically.", "url": "https://web.dev/learn/performance/optimize-resource-loading"},
{"claim": "async on a module script fetches it and its dependencies in parallel and runs it as soon as available.", "quote": "For module scripts, if the async attribute is present then the scripts and all their dependencies will be fetched in parallel to parsing and evaluated as soon as they are available.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"},
{"claim": "async scripts carry no ordering guarantee.", "quote": "You get no guarantee that scripts will run in any specific order.", "url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script"}
]}Provenance of the numbers on this page
- run set
- scaffold-or-scale-v1
- models
- Haiku 4.5, Sonnet 5.5, Opus 5.5
- effort
- high
- repeats
- 2
- fixtures
- replay
- runs
- 900 / 900
- strategy cost
- $354.44
- judge cost
- $9.19
- wall clock
- 9h 48m
- git
- fce5807b2d
Cost excludes judge calls, which are tracked separately so a scoring model never flatters or penalises an architecture. Every figure on this site is read from results/ at build time.