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
718: 3D Printing Life Upgrades, Don’t Give Away Your Dopamine, and CodePen App Deploys
Jun 8 · 58 min
10% Happier with Dan Harris
Your Nervous System Is Being Hijacked. Here's How To Get It Back. | Tara Brach
Jun 3
More from Shop Talk Show
717: Better DX for Web Components, What Was Popular That Now We’re Used To?
Jun 1 · 53 min
Latent Space
Railway: The Agent-Native Cloud — Jake Cooper
May 20
More from Shop Talk Show
We summarize every new episode. Want them in your inbox?
718: 3D Printing Life Upgrades, Don’t Give Away Your Dopamine, and CodePen App Deploys
717: Better DX for Web Components, What Was Popular That Now We’re Used To?
716: Google I/O 2026 Recap Edition
715: Would You Like a LLM With Your Browser?
714: Camping, Burnout, and Chris’ CSS Talk
Similar Episodes
Related episodes from other podcasts
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
The Joe Rogan Experience
May 7
#2495 - Tim Burchett
Software Engineering Daily
May 5
SmartBear and Multi-Agent QA
10% Happier with Dan Harris
Apr 24
Feel Your Feelings, Drop the Story | Sebene Selassie
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 up to 3 shows.
Start My Monday DigestNo credit card · Unsubscribe anytime