← Chrome 149 reference

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.

Developer trial / behind a flag In developer trial in Chrome 149. Enable via chrome://flags/#enable-experimental-web-platform-features. No API surface — this is a transparent runtime optimisation.

at a glance

Status in 149In developer trial (behind a flag)
Flagchrome://flags/#enable-experimental-web-platform-features
API changeNone — transparent performance optimisation
SpecHTML Standard (no new IDL)
Blink componentBlink>JavaScript>Compiler
ChromeStatus5132993816559616 — 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.

Source: chromestatus summary.

who benefits

Server-side rendered pagesSSR frameworks that embed large initialisation scripts inline (Next.js, Nuxt, Astro data islands) benefit most.
Stable HTMLThe cache is keyed on script source content. Pages where the HTML changes on every load (personalised content) see less benefit.
Returning visitorsFirst load still compiles; subsequent loads with the same HTML hit the cache.
Source: chromestatus summary.

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

Chrome149 — developer trial (flag required)
EdgeTracking Chromium
FirefoxN/A (implementation detail)
SafariN/A (implementation detail)
Source: chromestatus.

see also