HN user

chowderman

215 karma
Posts4
Comments11
View on HN

HTML can easily be offline-able. Base64 your images or use SVG, put your CSS in the HTML page, remove all 2-way data interaction, basically reduce HTML to the same performance as PDF and allow it to be downloaded.

I built a tool for this exact purpose[0] since the HTML specification and modern browsers have a lot of nice features for creating and reading documents compared to PDF (reflow and responsive page scaling, accessibility, easily sharable, a lot of styling options that are easy to use, ability for the user to easily modify the document or change the style, integration with existing web technologies, etc.). In general I would rather read an HTML document than the PDF document since I like to modify the styling in various ways (dark theme extensions in the browser for example) which may be hard to do with a PDF, but its more of a personal preference. Some people will prefer that the document adjusts to the screen size of the device (many HTML pages), and others will prefer the exact same or similar rendering regardless of the screen size (PDF).

Either way, kind of a fun idea making a website using just PDFs. Not the most practical choice, but fun none-the-less.

[0] https://github.com/chowderman/hyperfiler

There is also a similar program called HyperFiler[0]* that bundles web pages into single HTML files with a few more options such as a headless chromium transport option, built in minifiers, page sanitizers, and an option to grayscale the output pages, among other options. It's TypeScript based and has an programmatic API to customize the bundling process as well.

[0] https://github.com/chowderman/hyperfiler

* disclaimer: I created HyperFiler

Same here, I think small comments every 3-10 lines adds a lot of value, especially to large code bases. Being able to quickly scan through comments visually when you only need a high level overview of a chunk of code can take a 5 minute task of reading and understanding 50 lines of code into a 15 second task of reading and digesting a few small comments.

Also, I'm curious to see how your experience was working on the firefox code base. I haven't checked out the code base myself, but have built from source a few times. Curious to see how the Rust progress has been going on the code base and which parts of firefox are currently implemented in Rust.

A project that I created (written in TypeScript) to bundle web pages into single HTML files with the goal of producing as small of bundles as possible. Also includes a rich set of features to customize pages (around 100 command line arguments are available), and some other interesting features, such as the ability to inject a Flash player into the bundled page that will run flash content bundled in the page.

It can be packed very easily actually! It is a single HTML file, so you can easily embed it into an electron app or a webview if you wanted. Only problem is it would bring the total size to ~100 MB instead of ~1 MB, and would be tough to make it a single .exe file.

The main differences are:

* it works totally offline (it performs no XHR requests and none of the libraries are linked to CDNs or other sites)

* is contained within a single ~1 MB in size .html file (I baked all images, scripts, style sheets, etc. within a single file)

* is lighter, as I removed some features to keep it closer to the original (but kept a few like the history and rendering as a GIF)

* is Win XP themed instead of Win 95