668: Jake Archibald on Native HTML Includes
Episode
65 min
Read time
2 min
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
712: Lazy Loading the Web with Scott Jehl
Apr 27 · 64 min
Morning Brew Daily
Jerome Powell Ain’t Leavin’ Yet & Movie Tickets Cost $50!?
Apr 30
More from Shop Talk Show
711: Where did Oh My Zsh Come From? And Using Rails in 2026
Apr 20 · 63 min
a16z Podcast
Workday’s Last Workday? AI and the Future of Enterprise Software
Apr 30
More from Shop Talk Show
We summarize every new episode. Want them in your inbox?
712: Lazy Loading the Web with Scott Jehl
711: Where did Oh My Zsh Come From? And Using Rails in 2026
710: Simen Svale from Sanity
709: Slopforking a CMS, Apple Browser Feedback, and Custom Theme CSS
708: People Are Not Friction, Getting Rid of the CMS, and Social RSS Follow Up
Similar Episodes
Related episodes from other podcasts
Morning Brew Daily
Apr 30
Jerome Powell Ain’t Leavin’ Yet & Movie Tickets Cost $50!?
a16z Podcast
Apr 30
Workday’s Last Workday? AI and the Future of Enterprise Software
Masters of Scale
Apr 30
How Poppi’s founders built a new soda brand worth $2 billion
Snacks Daily
Apr 30
🦸♀️ “MAMA Stocks” — Zuck’s Ad/AI machine. Hilary Duff’s anti-Ozempic bet. Bill Ackman’s Influencer IPO. +Refresher surge
The Mel Robbins Podcast
Apr 30
Eat This to Live Longer, Stay Young, and Transform Your Health
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
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