Gwtar is a new polyglot HTML archival format which provides a single, self-contained, HTML file which still can be efficiently lazy-loaded by a web browser. This is done by a header’s JavaScript making HTTP range requests. It is used on Gwern.net to serve large HTML archives.
[...]
We introduce a new format, Gwtar (logo; pronounced “guitar”, .gwtar.html extension), which achieves all 3 properties simultaneously. A Gwtar is a classic fully-inlined HTML file, which is then processed into a self-extracting concatenated file of an HTML + JavaScript header followed by a tarball of the original HTML and assets. The HTML header’s JS stops web browsers from loading the rest of the file, loads just the original HTML, and then hooks requests and turns them into range requests into the tarball part of the file.
Thus, a regular web browser loads what seems to be a normal HTML file, and all assets download only when they need to. In this way, a static HTML page can inline anything—such as gigabyte-size media files—but those will not be downloaded until necessary, even while the server sees just a single large HTML file it serves as normal. And because it is self-contained in this way, it is forwards-compatible: no future user or host of a Gwtar file needs to treat it specially, as all functionality required is old standardized web browser/server functionality.
This is really cool... but the example page doesn't actually load any of the resources, the title image or the audio clip, for me - neither on firefox nor on edge. That's not exactly convincing....
This is really cool... but the example page doesn't actually load any of the resources, the title image or the audio clip, for me - neither on firefox nor on edge. That's not exactly convincing.
edit: okay no, now that I posted this it does work, dunno if it needed several refreshes or just a couple minutes of waiting, or perhaps the page decided to load the big audio file very slowly before the title image. Still not great as the example, but it does work.
From the article:
[...]
This is really cool... but the example page doesn't actually load any of the resources, the title image or the audio clip, for me - neither on firefox nor on edge. That's not exactly convincing.
edit: okay no, now that I posted this it does work, dunno if it needed several refreshes or just a couple minutes of waiting, or perhaps the page decided to load the big audio file very slowly before the title image. Still not great as the example, but it does work.