v149 · performance · developer trial
Inline script cache
Chrome 149 caches compiled bytecode for inline <script> blocks — scripts embedded directly in HTML rather than loaded from a separate URL. Pages that revisit the same HTML can skip V8's compilation step, reducing parse and startup time for JavaScript-heavy pages.
chrome://flags/#enable-experimental-web-platform-features. No API surface — this is a transparent runtime optimisation.
at a glance
| Status in 149 | In developer trial (behind a flag) |
|---|---|
| Flag | chrome://flags/#enable-experimental-web-platform-features |
| API change | None — transparent performance optimisation |
| Spec | HTML Standard (no new IDL) |
| Blink component | Blink>JavaScript>Compiler |
| ChromeStatus | 5132993816559616 — Inline script cache |
why it exists
External scripts loaded via <script src="..."> have benefited from bytecode caching since Chrome 66: after the first parse, V8 stores the compiled representation in the HTTP cache alongside the resource. The same optimisation was not applied to inline scripts because they have no URL — they're part of the HTML document. The inline script cache extends bytecode caching to inline scripts by keying the cache on a hash of the script source, storing it alongside the HTML document's cache entry. Pages that re-visit the same version of a page (same HTML content) now skip inline script compilation on subsequent loads.
who benefits
| Server-side rendered pages | SSR frameworks that embed large initialisation scripts inline (Next.js, Nuxt, Astro data islands) benefit most. |
|---|---|
| Stable HTML | The cache is keyed on script source content. Pages where the HTML changes on every load (personalised content) see less benefit. |
| Returning visitors | First load still compiles; subsequent loads with the same HTML hit the cache. |
no code changes needed
This optimisation is entirely transparent. Your HTML and JavaScript do not change:
<!-- This inline script is now cached after the first parse -->
<script>
const data = {"user":"alice","theme":"dark","locale":"en"};
window.__INITIAL_DATA__ = data;
initApp(data);
</script>
The cache is keyed on script content. If the script text changes (e.g. personalised data embedded), the cache is invalidated and the script is recompiled.
browser support
| Chrome | 149 — developer trial (flag required) |
|---|---|
| Edge | Tracking Chromium |
| Firefox | N/A (implementation detail) |
| Safari | N/A (implementation detail) |