Stitch Together Lots of Little HTML Pages with Navigations for Interactions
Jim Nielsen proposes a return to web fundamentals, advocating for 'Lots of Little HTML Pages' (LLMs) and multi-page navigations over complex JavaScript-driven in-page interactions. This approach prioritizes core browser capabilities and progressive enhancement, making sites more robust and accessible. It resonates with Hacker News's appreciation for elegant simplicity, performance, and challenging modern web development orthodoxies.
The Lowdown
This article reminds developers of a simpler, often overlooked approach to web interactions: leveraging multiple, small HTML pages and standard navigations instead of heavy JavaScript. The author, Jim Nielsen, re-evaluates his previous concept of 'Lots of Little HTML Pages' (LLMs) and finds the core idea still holds strong, with minor refinements. The philosophy centers on treating the browser as a document navigator rather than a complex runtime.
- Core Idea: Replace JavaScript-driven in-page interactions (like expanding menus) with full-page navigations to dedicated, small HTML pages.
- Enhancement with CSS: These multi-page navigations are visually enhanced using CSS View Transitions for a smoother user experience on modern browsers.
- Robustness and Accessibility: The system gracefully degrades; if CSS View Transitions aren't supported or JavaScript is disabled, the fundamental link navigation still works, ensuring universal access.
- Implementation Example: For a menu, a simple
<a>tag links to/menu/. On the menu page, a link (often styled as an 'X') links back to/, optionally using a small JavaScript snippet (history.back()) to prevent adding the 'menu' page to the browser history. - Philosophy: The approach emphasizes thinking about the web as a collection of documents and leveraging inherent browser functionalities, leading to simpler, faster, and more resilient websites.
Ultimately, Nielsen suggests that by re-framing how we view browser capabilities and prioritizing fundamental HTML links, developers can create web experiences that are both performant and broadly accessible, often with less complexity than modern, JS-heavy alternatives.