← Back to context

Comment by tuo-lei

8 hours ago

The single HTML file as a distribution format is really underrated. No server, no CORS issues, no CDN — just open the file. It works offline, you can email it, and it'll still work in 10 years.

I ship self-contained HTML files for a different project and the sneakiest gotcha is </ sequences inside inline <script> tags — the browser sees </ and tries to close the script tag prematurely. You have to escape them as <\/. Curious if the author ran into that one.

Fun concept for the format too — games are the perfect use case.