HN user

gildas

1,458 karma

I'm a French software engineer, living in the city of Rennes. I'm the founder of SEO4Ajax (seo4ajax.com), and I'm the author of SingleFile and zip.js (github.com/gildas-lormeau).

Posts50
Comments397
View on HN
developer.chrome.com 15d ago

Aug 31st 2026: All Manifest V2 extensions removed from the Chrome Web Store

gildas
4pts1
gwern.net 5mo ago

Gwtar: A static efficient single-file HTML format

gildas
4pts0
gildas-lormeau.github.io 1y ago

How to Create HTML/ZIP/PNG Polyglot Files

gildas
106pts37
gildas-lormeau.github.io 1y ago

Show HN: HTML Meets Zip Meets PNG: When Files Have More Layers Than an Onion

gildas
3pts2
gildas-lormeau.github.io 1y ago

Show HN: Create HTML/Zip/PNG Polyglot Files in JavaScript (Web Presentation)

gildas
2pts0
github.com 2y ago

Create HTML/ZIP/PNG Polyglot Files in JavaScript

gildas
5pts1
github.com 2y ago

Show HN: Create your HTML/ZIP/PNG polyglot file in JavaScript

gildas
2pts0
gildas-lormeau.github.io 2y ago

Show HN: Create HTML/Zip/PNG Polyglot Files in JavaScript

gildas
4pts0
gildas-lormeau.github.io 2y ago

A file that is both an acceptable HTML page, a PNG image, and a ZIP archive

gildas
3pts0
gildas-lormeau.github.io 2y ago

A file that is both an acceptable HTML page, a PNG image, and a ZIP archive

gildas
2pts0
gildas-lormeau.github.io 2y ago

Web page which is also a PNG file and a ZIP file

gildas
2pts0
gildas-lormeau.github.io 2y ago

Webpage is also a PNG file and a ZIP file

gildas
2pts2
gildas-lormeau.github.io 2y ago

New Feature: Self-Extracting Zip Files Added to SingleFile

gildas
4pts0
gildas-lormeau.github.io 2y ago

New Feature: Self-Extracting Zip Files Added to SingleFile

gildas
1pts1
www.washingtonpost.com 3y ago

The internet’s memory is fading in front of us. Preserve what you can

gildas
3pts0
github.com 3y ago

Scoop: High-fidelity, browser-based, single-page web archiving library and CLI

gildas
2pts0
gildas-lormeau.github.io 3y ago

Show HN: Progressive Web App to manage (read/edit/write) zip files

gildas
2pts0
apps.apple.com 3y ago

Show HN: SingleFile is finally available on Safari (macOS/iOS)

gildas
91pts50
news.ycombinator.com 4y ago

Show HN: Zip files 4 times faster than 7-Zip with a demo written in JavaScript

gildas
12pts0
groups.google.com 4y ago

Intent to Prototype: Topics API

gildas
1pts0
github.com 4y ago

Show HN: SingleFile Lite, new version of SingleFile compatible with Manifest V3

gildas
4pts2
www.eff.org 4y ago

Manifest V3: Open Web Politics in Sheep's Clothing

gildas
7pts1
bugs.chromium.org 4y ago

Add an option to inline all resources as base64 to the Save Page As dialog

gildas
2pts0
shkspr.mobi 4y ago

You don't need external assets in an HTML file

gildas
31pts11
groups.google.com 5y ago

Intent to Experiment: Reduce User Agent String Information

gildas
1pts0
wicg.github.io 5y ago

Use Cases and Requirements for Web Packages

gildas
1pts0
gildas-lormeau.github.io 5y ago

Official Release of zip.js 2.0

gildas
1pts0
gildas-lormeau.github.io 5y ago

Polyglot HTML/Zip file using zip encryption (pass: thisisapage)

gildas
2pts0
github.com 5y ago

Show HN: Save web pages as self-extracting HTML/ZIP files from the CLI

gildas
16pts3
www.youtube.com 6y ago

Color Maximite 2 – ARM CPU that runs BASIC

gildas
2pts0

I have an example of a side-project [1] where I think I naturally applied the best practices described in this article. My goal was to see if it's possible to code an entire project using a single agent (Claude).

To do this, I "simply" asked the agent, every time it encountered an issue, how to resolve it, using a validation tool or script. I also asked it to code these tools during audits. As a result, I now have over 30+ rules [2] for validating their commits. It's working pretty well now.

[1] https://github.com/gildas-lormeau/rebuild-and-ruin (let the timer expire to see the "demo" mode)

[2] https://github.com/gildas-lormeau/rebuild-and-ruin/blob/a4c3...

I just ran a test on a 10GB HTML page and called window.stop() via a 100ms setTimeout, which, in my opinion, simulates what would happen in a better-implemented case in SingleFile if the call to window.stop() were made as soon as the HTTP headers of the fetch request are received (i.e. easy fix). And it actually works. It interrupts the loading at approx. 15MB of data, the rendering of the page, and it's partially and smoothly displayed (no freeze). So it's not totally useless but it deserves to be optimized at a minimum in SingleFile, as I indicated. In the end, the MDN documentation is not very clear...

Edit: I've just implemented the "good enough of my machine fix" aka the "easy fix", https://github.com/gildas-lormeau/single-file-core/commit/a0....

Edit #2: I've just understood that "parent" in "this method cannot interrupt its *parent* document's loading" from the MDN doc probably means the "parent" of the frame (when the script is running into it).

The call to window.stop() stops HTML parsing/rendering, which is unnecessary since the script has downloaded the page via HTTP and will decompress it as-is as a binary file (zip.js supports concatenated payloads before and after the zip data). However, in my case, the call to window.stop() is executed asynchronously once the binary has been downloaded, and therefore may be too late. This is probably less effective than in your case with gtwar.

I implemented this in the simplest way possible because if the zip file is read from the filesystem, window.stop() must not be called immediately because the file must be parsed entirely. In my case, it would require slightly more complex logic to call window.stop() as early as possible.

Edit: Maybe it's totally useless though, as documented here [1]: "Because of how scripts are executed, this method cannot interrupt its parent document's loading, but it will stop its images, new windows, and other still-loading objects." (you mentioned it in the article)

[1] https://developer.mozilla.org/en-US/docs/Web/API/Window/stop

Edit #2: Since I didn't know that window.call() was most likely useless in my case, I understand your approach much better now. Thank you very much for clarifying that with your question!

I haven't looked closely, but I get the impression that this is an implementation detail which is not really related to the format. In this case, a polyglot zip/html file could also interrupt page loading via a window.stop() call and rely on range requests (zip.js supports them) to unzip and display the page. This could also be transparent for the user, depending on whether the file is served via HTTP or not. However, I admit that I haven't implemented this mechanism yet.

Unfortunately, I will have difficulty answering your question because my knowledge is limited to the zip format. In the use case presented in the article, I find that the zip format meets the need well. Generally speaking, in the context of long-term archiving, its big advantage is also that there are thousands of implementations for reading/writing zip files.

The warning message you mentioned simply means that the extension can inject "content scripts" into the web pages you visit. This feature is necessary, for example, to remove ads that cannot be blocked via HTTP.

Thank you for explaining your point of view on the interest of this conversation. Here's mine, I consider an offense to be something quite subjective sometimes. In some cases, it's possible to offend someone without meaning to. The solution to this problem is to apologize and offer to talk about it. If that doesn't work, and the offense is in some way "forbidden", then the offended person can simply defend themselves by going to the “authorities”.

I'm sorry if you feel offended. My comments will be removed by HN moderators if they think it's necessary. You can flag and downvote them meanwhile. You can also contact the moderators or your local police if you think it is necessary.

EDIT: It might not be possible to flag or downvote comments. So, I recommend you to contact the moderators or your local police. You can find my name and address on my GitHub profile.