4 ms·
I've built React SPAs with inlined JS, CSS and SVGs in 2017, which is why I'm still entirely clueless what's special about this. BTW, the discussed page is not
by gigel82 5y ago
I've built React SPAs with inlined JS, CSS and SVGs in 2017, which is why I'm still entirely clueless what's special about this.
BTW, the discussed page is not at all a single-page site; it makes separate network requests for CSS and PNG files.
- dredmorbius 5y agoThe point of this demonstration is that single-file provisioning is specifically the point. And specifically, using only HTML and CSS. The concept of an "SPA" refers to the appearance rather than provisioning of the app, and inherently relies on Javascript (or an equivalent scripting capability) to interactively rewrite the display. It's possible to single-file an SPA. The characteristic isn't central to the SPA concept, and in practice implementation is typically anything but. SPAs are not accessible without Javascript, and don't render at all from a terminnal / console-mode browser. (Ask me how I know this...) This is not an app. It's a website, or at least, multiple web pages, provisioned from a single HTML file. Yes, this instance has several external references. I've noted CSS in an earlier comment, you mention image assets. The concept could be further optimised for portability by incorporating those inline. Note that optimisations are also trade-offs. Inlined assets would mean duplication for a larger site. Which of those trade-offs are preferable or unwanted really depends on the specific goals. But as a demonstration of an idea, this really is pretty elegant.
- kome 5y agoyeah, but you missed the point.