logoalt Hacker News

Gwtar: A static efficient single-file HTML format

89 pointsby theblazehentoday at 3:37 PM19 commentsview on HN

Comments

simonwtoday at 5:41 PM

TIL about window.stop() - the key to this entire thing working, it's causes the browser to stop loading any more assets: https://developer.mozilla.org/en-US/docs/Web/API/Window/stop

Apparently every important browser has supported it for well over a decade: https://caniuse.com/mdn-api_window_stop

Here's a screenshot illustrating how window.stop() is used - https://gist.github.com/simonw/7bf5912f3520a1a9ad294cd747b85... - everything after <!-- GWTAR END is tar compressed data.

Posted some more notes on my blog: https://simonwillison.net/2026/Feb/15/gwtar/

show 2 replies
tym0today at 6:58 PM

I was on board until I saw that those can't easily be opened from a local file. Seems like local access is one of the main use case for archival formats.

show 1 reply
mr_mitmtoday at 7:16 PM

Pretty cool. I made something similar (much more hacky) a while ago: https://github.com/AdrianVollmer/Zundler

Works locally, but it does need to decompress everything first thing.

zetanortoday at 5:42 PM

The author dismisses WARC, but I don't see why. To me, Gwtar seems more complicated than a WARC, while being less flexible and while also being yet another new format thrown onto the pile.

show 2 replies
spankaleetoday at 6:43 PM

I really don't understand why a zip file isn't a good solution here. Just because is requires "special" zip software on the server?

show 1 reply
O1111OOOtoday at 6:20 PM

I gave up a long time ago and started using the "Save as..." on browsers again. At the end of the day, I am interested in the actual content and not the look/feel of the page.

I find it easier to just mass delete assets I don't want from the "pageTitle_files/" directory (js, images, google-analytics.js, etc).

show 1 reply
renewiltordtoday at 6:25 PM

Hmm, I’m interested in this, especially since it applies no compression delta encoding might be feasible for daily scans of the data but for whatever reason my Brave mobile on iOS displays a blank page for the example page. Hmm, perhaps it’s a mobile rendering issue because Chrome and Safari on iOS can’t do it either https://gwern.net/doc/philosophy/religion/2010-02-brianmoria...

wetpawstoday at 6:07 PM

[dead]

nullsanitytoday at 6:39 PM

Gwtar seems like a good solution to a problem nobody seemed to want to fix. However, this website is... something else. It's full of inflated self impprtantance, overly bountiful prose, and feels like someone never learned to put in the time to write a shorter essay. Even the about page contains a description of the about page.

I don't know if anyone else gets "unemployed megalomaniacal lunatic" vibes, but I sure do.

show 2 replies