Async Script Tester
Test JavaScript loading strategies (async, defer, module) in a real-time sandbox. Analyze blocking behavior, execution order, and network timing.
About
This tool analyzes the critical rendering path impact of external JavaScript resources. By isolating execution in a controlled sandbox, it measures the delta between Tfetch (network retrieval) and Texec (runtime parsing). Inefficient script loading is a primary cause of LCP (Largest Contentful Paint) degradation.
We simulate the browser's parser behavior using real DOM injection. Unlike static linters, this tool executes the code to detect runtime errors, CORS violations, and main-thread blocking events. Use this to validate async vs defer strategies before deploying to production.
Formulas
The impact on the main thread is calculated by measuring the delay in the event loop during script execution.
Where tframe_budget is typically 16.67ms (60fps). If Tload happens during HTML parsing without defer, the parser halts:
Reference Data
| Attribute | Fetch Behavior | Execution Timing | Blocking Risk |
|---|---|---|---|
<script> | Synchronous (Pauses HTML Parser) | Immediate (Blocks Rendering) | HIGH |
<script async> | Parallel (Background) | Immediately upon load (Interrupts Parser) | MEDIUM |
<script defer> | Parallel (Background) | After HTML Parsing (Before DOMContentLoaded) | LOW |
type="module" | Parallel (Background) | Deferred by default | LOW |