frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Gwtar: A static efficient single-file HTML format

https://gwern.net/gwtar
68•theblazehen•3h ago

Comments

simonw•1h ago
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/

8n4vidtmkvmk•1h ago
Neat! I didn't know about this either.

Php has a similar feature called __halt_compiler() which I've used for a similar purpose. Or sometimes just to put documentation at the end of a file without needing a comment block.

moritzwarhier•38m ago
Not the inverse, but for any SPA (not framework or library) developers seeing this, it's probably worth noting that this is not better than using document.write, window.open and simular APIs.

But could be very interesting for use cases where the main logic lives on the server and people try to manually implement some download- and/or lazy-loading logic.

Still probably bad unless you're explicitly working on init and redirect scripts.

zetanor•1h ago
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.
simonw•1h ago
I don't think you can provide a URL to a WARC that can be clicked to view its content directly in your browser.
zetanor•1h ago
At the very least, WARC could have been used as the container ("tar") format after the preamble of Gwtar. But even there, given that this format doesn't work without a web server (unlike SingleFile, mentioned in the article), I feel like there's a lot to gain by separating the "viewer" (Gwtar's javascript) from the content, such that the viewer can be updated over time without changing the archives.

I certainly could be missing something (I've thought about this problem for all of a few minutes here), but surely you could host "warcviewer.html" and "warcviewer.js" next to "mycoolwarc.warc" "mycoolwrc.cdx" with little to no loss of convenience, and call it a day?

obscurette•59m ago
WARC is mentioned with very specific reason not being good enough: "WARCs/WACZs achieve static and efficient, but not single (because while the WARC is a single file, it relies on a complex software installation like WebRecorder/Replay Webpage to display)."
O1111OOO•47m ago
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).

renewiltord•41m ago
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...
nullsanity•28m ago
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.

fluidcruft•26m ago
What's up with the non-stop knee-jerk bullshit ad hom on HN lately?
Krutonium•18m ago
We're tired, chief.
esseph•17m ago
The earth is falling out from under a lot of people, and they're trying to justify their position on the trash heap as the water level continues to rise around it. It's a scary time.
3rodents•20m ago
gwern is a legendary blogger (although blogger feels underselling it… “publisher”?) and has earned the right to self-aggrandize about solving a problem he has a vested interest in. Maybe he’s a megalomaniac and/or unemployed and/or writing too many words but after contributing so much, he has earned it.
spankalee•23m ago
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?
tym0•9m ago
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.

LT6502: A 6502-based homebrew laptop

https://github.com/TechPaula/LT6502
121•classichasclass•1h ago•24 comments

EU bans the destruction of unsold apparel, clothing, accessories and footwear

https://environment.ec.europa.eu/news/new-eu-rules-stop-destruction-unsold-clothes-and-shoes-2026...
280•giuliomagnifico•1h ago•195 comments

I Fixed Windows Native Development

https://marler8997.github.io/blog/fixed-windows/
460•deevus•7h ago•233 comments

Towards Autonomous Mathematics Research

https://arxiv.org/abs/2602.10177
15•gmays•32m ago•3 comments

Gwtar: A static efficient single-file HTML format

https://gwern.net/gwtar
69•theblazehen•3h ago•16 comments

Hideki Sato, designer of all Sega's consoles, has died

https://www.videogameschronicle.com/news/hideki-sato-designer-of-segas-consoles-dies-age-75/
169•magoghm•2h ago•8 comments

Palantir Gets Millions of Dollars from New York City's Public Hospitals

https://theintercept.com/2026/02/15/palantir-contract-new-york-city-health-hospitals/
88•cdrnsf•1h ago•22 comments

I love the work of the ArchWiki maintainers

https://k7r.eu/i-love-the-work-of-the-archwiki-maintainers/
800•panic•17h ago•142 comments

Real-time PathTracing with global illumination in WebGL

https://erichlof.github.io/THREE.js-PathTracing-Renderer/
32•tobr•3d ago•7 comments

An Enslaved Gardener Transformed the Pecan into a Cash Crop

https://lithub.com/how-an-enslaved-gardener-transformed-the-pecan-into-a-cash-crop/
50•PaulHoule•3h ago•33 comments

Flashpoint Archive – Over 200k web games and animations preserved

https://flashpointarchive.org
282•helloplanets•13h ago•70 comments

Oat – Ultra-lightweight, semantic, zero-dependency HTML UI component library

https://oat.ink/
341•twapi•10h ago•92 comments

Palantir vs. the "Republik": US analytics firm takes magazine to court

https://www.heise.de/en/news/Palantir-vs-the-Republik-US-analytics-firm-takes-magazine-to-court-1...
87•cdrnsf•2h ago•18 comments

Reversed engineered game Starflight (1986)

https://github.com/s-macke/starflight-reverse
75•tosh•7h ago•37 comments

How Is Data Stored?

https://www.makingsoftware.com/chapters/how-is-data-stored
91•tzury•5d ago•6 comments

1940s Irish sci-fi novel features early mecha and gravity assists

https://github.com/cavedave/Manannan
25•donohoe•4h ago•8 comments

(Ars) Editor's Note: Retraction of article containing fabricated quotations

https://arstechnica.com/staff/2026/02/editors-note-retraction-of-article-containing-fabricated-qu...
18•bikenaga•37m ago•4 comments

Amazon, Google Unwittingly Reveal the Severity of the U.S. Surveillance State

https://greenwald.substack.com/p/amazons-ring-and-googles-nest-unwittingly
489•mikece•6h ago•331 comments

RynnBrain

https://github.com/alibaba-damo-academy/RynnBrain
54•jsemrau•4d ago•5 comments

The Spy Who Found T. Rex

https://nautil.us/the-spy-who-found-t-rex-1267359/
4•speckx•3d ago•0 comments

My smart sleep mask broadcasts users' brainwaves to an open MQTT broker

https://aimilios.bearblog.dev/reverse-engineering-sleep-mask/
564•minimalthinker•1d ago•237 comments

The seam through the center of things

https://usefulfictions.substack.com/p/the-seam-through-the-center-of-things
30•surprisetalk•2d ago•5 comments

Two different tricks for fast LLM inference

https://www.seangoedecke.com/fast-llm-inference/
137•swah•9h ago•61 comments

Build Gaussian Splat Experiences with SuperSplat Studio

https://blog.playcanvas.com/build-gaussian-splat-experiences-with-supersplat-studio/
22•ovenchips•4d ago•4 comments

A practical guide to observing the night sky for real skies and real equipment

https://stargazingbuddy.com/
105•constantinum•3d ago•18 comments

Constraint Propagation for Fun

https://eli.li/constraint-propagation-for-fun
43•rickcarlino•5d ago•0 comments

Zvec: A lightweight, fast, in-process vector database

https://github.com/alibaba/zvec
203•dvrp•2d ago•35 comments

Instagram's URL Blackhole

https://medium.com/@shredlife/instagrams-url-blackhole-c1733e081664
287•tkp-415•2d ago•44 comments

Scientists observe a 300M-year-old brain rhythm in several animal species

https://phys.org/news/2026-01-scientists-million-year-brain-rhythm.html
5•PaulHoule•15m ago•0 comments

DjVu and its connection to Deep Learning (2023)

https://scottlocklin.wordpress.com/2023/05/31/djvu-and-its-connection-to-deep-learning/
59•tosh•10h ago•9 comments