News for hackers. Stuff that matters.

Ask HN: Best way to bundle as HTML? Maybe even vids included

Is there a way to make a rich HTML page self-containing?

I love html, pdf not so much. I also love epub, but it has narrow uses.

Existing HTML embedding in to HTML is possible, but Data URI has a 2MB limit on Chrome I think. Maybe a blob helps?

Is there any way I could bundle/pack all scripts, images and maybe videos in to an html in a sane way? Is this feasible at all?

I guess browsers might load the html in to RAM, that could be a problem.

( 2 comments | 3 points | on HN )
Re:Ask HN: Best way to bundle as HTML? Maybe even vids included by byoung2 on Tuesday May 28, 2019 @01:58PM (#20032645)
Something like an Electron app but lighter? How would you be distributing this?

https://electronjs.org/

Re:Ask HN: Best way to bundle as HTML? Maybe even vids included by bammmmm on Tuesday May 28, 2019 @02:00PM (#20032664)
I'd attach it to an email or send it over slack and hope html opens with a sane browser on the other end :)

more like https://github.com/remy/inliner

or https://addons.mozilla.org/de/firefox/addon/single-file/

But I guess these have the 2MB limit and I don't know if maybe more limits.