668: Jake Archibald on Native HTML Includes
Episode
65 min
Read time
2 min
Topics
Remote Work, Design & UX, Software Development
AI-Generated Summary
Key Takeaways
- ✓Parser Blocking Requirement: Native HTML includes must block parsing by default to prevent layout shifts, similar to non-deferred script tags. Async attribute could enable opt-in non-blocking behavior, but default blocking prevents content jumping that degrades core web vitals and user experience across production sites.
- ✓Complete Tree Constraint: Included HTML must form complete document fragments where unclosed tags auto-close at include boundaries, preventing split-tag patterns like opening divs in one file and closing in another. This mirrors JavaScript ESM behavior where imports cannot split code blocks across files, maintaining parseable structure.
- ✓Streaming Implementation: Browser should stream included content as it downloads rather than waiting for complete response, enabling progressive rendering. This matches native HTML parsing behavior and outperforms fetch-then-innerHTML patterns that delay content display until full download completes, especially on slow connections with large responses.
- ✓Security Considerations: Implementation requires CORS checks and text/html content-type validation to prevent XSS attacks. Existing sites using HTML tag blacklists rather than allowlists face vulnerability since new include tags could inject scripts from external sources, potentially requiring meta-tag opt-in similar to form styling features.
- ✓Lower-Level API First: Standards bodies prefer shipping JavaScript streaming API before declarative HTML tags, enabling response.body pipe-to-element functionality. This provides building blocks for web component polyfills and proves streaming viability before committing to parser-level changes that affect all browsers permanently.
What It Covers
Jake Archibald joins to explore why HTML lacks native includes while CSS and JavaScript can import themselves, proposing solutions for parser-blocking streaming includes with complete tree requirements and CORS checks.
Key Questions Answered
- •Parser Blocking Requirement: Native HTML includes must block parsing by default to prevent layout shifts, similar to non-deferred script tags. Async attribute could enable opt-in non-blocking behavior, but default blocking prevents content jumping that degrades core web vitals and user experience across production sites.
- •Complete Tree Constraint: Included HTML must form complete document fragments where unclosed tags auto-close at include boundaries, preventing split-tag patterns like opening divs in one file and closing in another. This mirrors JavaScript ESM behavior where imports cannot split code blocks across files, maintaining parseable structure.
- •Streaming Implementation: Browser should stream included content as it downloads rather than waiting for complete response, enabling progressive rendering. This matches native HTML parsing behavior and outperforms fetch-then-innerHTML patterns that delay content display until full download completes, especially on slow connections with large responses.
- •Security Considerations: Implementation requires CORS checks and text/html content-type validation to prevent XSS attacks. Existing sites using HTML tag blacklists rather than allowlists face vulnerability since new include tags could inject scripts from external sources, potentially requiring meta-tag opt-in similar to form styling features.
- •Lower-Level API First: Standards bodies prefer shipping JavaScript streaming API before declarative HTML tags, enabling response.body pipe-to-element functionality. This provides building blocks for web component polyfills and proves streaming viability before committing to parser-level changes that affect all browsers permanently.
Notable Moment
Jake revealed he resigned from his position the day of recording, creating an unexpected announcement moment. The hosts reacted with audible surprise when he privately shared his next role, which involves returning to a previous type of work in the web standards space.
You just read a 3-minute summary of a 62-minute episode.
Get Shop Talk Show summarized like this every Monday — plus up to 2 more podcasts, free.
Pick Your Podcasts — FreeKeep Reading
More from Shop Talk Show
724: Ask Dan Abramov Anything About AT Proto
Jul 20 · 55 min
Modern Wisdom
33 Brutal Truths To Stop Wasting Your Potential - Alex Hormozi - #1117
Jun 29
More from Shop Talk Show
723: Ads on Your Website, UX for Web Dev Jobs, and Progressive Web Components
Jul 13 · 57 min
10% Happier with Dan Harris
How To Get Past Your Past | Yung Pueblo
Jun 17
More from Shop Talk Show
We summarize every new episode. Want them in your inbox?
724: Ask Dan Abramov Anything About AT Proto
723: Ads on Your Website, UX for Web Dev Jobs, and Progressive Web Components
722: The No-AI Talk Challenge, Picking Rails Tooling, Dark Mode?
721: New Gear, Nerding Out, and VS Code Forks
720: TypeScript Complaints, Slowing Down, and AT Proto Protocols
Similar Episodes
Related episodes from other podcasts
Modern Wisdom
Jun 29
33 Brutal Truths To Stop Wasting Your Potential - Alex Hormozi - #1117
10% Happier with Dan Harris
Jun 17
How To Get Past Your Past | Yung Pueblo
The Vergecast
Jun 15
# The **epic** story of Markdown
10% Happier with Dan Harris
Jun 3
Your Nervous System Is Being Hijacked. Here's How To Get It Back. | Tara Brach
Latent Space
May 20
Railway: The Agent-Native Cloud — Jake Cooper
Explore Related Topics
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
Read this week's Software Engineering Podcast Insights — cross-podcast analysis updated weekly.
You're clearly into Shop Talk Show.
Every Monday, we deliver AI summaries of the latest episodes from Shop Talk Show and 192+ other podcasts. Free for one show.
Start My Monday DigestNo credit card · Unsubscribe anytime