Hacker News new | ask | show | jobs
by notpushkin 18 hours ago
If you need a build script, your app is probably too big to be a single .html already.

> You can still cache the HTML.

But then any time you update any part of the app, the user has to re-download the whole thing. It is also a problem with many traditional frontend builds, but if you carefully split it into chunks, you can update parts of the app while most of it stays cached.

See e.g. Linear’s approach to vendor dependencies: https://performance.dev/how-is-linear-so-fast-a-technical-br...

---

The strong point of single .html apps is, of course, that you can run them locally without setting up a web server or anything, and deploy anywhere you want by just uploading it. But it is a fairly niche thing IMO.

1 comments

https://fuzzygraph.com is a 1.4Mb Single HTML file that I have a build script for (https://github.com/calebmadrigal/fuzzygraph).
Pretty graph! iOS Safari, takes just under a second probably to load each time I pan across the graph. Wonder what it’d take to bring it all the way to smooth scrolling—too demanding on resources?

Looking again, figure it has to do all the math again with each pan/drag, so minor latency makes sense.