HNHacker News
TopNewBestAskShowJobs

gildas

1,462 karma · joined May 2, 2011

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).
submissionscomments
gildas··on First place in Tetris 99 using computer vision, classical AI, a lot of free time
No T-spins [1], impressive!

[1] https://harddrop.com/wiki/T-Spin_Guide

gildas··on How to Create HTML/ZIP/PNG Polyglot Files
I think there's been a misunderstanding, there was an error in the article suggesting that zip.min.js is not inlined in the page. This error has been corrected meanwhile. I'm sorry for that. The goal is obviously to create pages that work offline, as shown in the demo.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
A <noscript> script would be even more suitable, but I agree with the principle. I added a link to view the demo without downloading the file, see https://gildas-lormeau.github.io/Polyglot-HTML-ZIP-PNG/demo.... (it was not working previously because GitHub serves pages in UTF-8).
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
For the record, I've just added a link to view the file without downloading it.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
That was just an example of syntax, nothing prevents you from blocking more resources and sandbox the page.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
Thanks, it was an error on my part, now corrected.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
This is done on purpose, so you can rename the file to make sure it's polyglot.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
Indeed, for example the HTML of the files used for the presentation slides [1] use <noframe> tags to keep the HTML well-formed. This point is addressed in the conclusion of the presentation.

[1] https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG/raw/...

gildas··on How to Create HTML/ZIP/PNG Polyglot Files
The request will be blocked by the CSP.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
Here is the demo file (cf. the first paragraph and the end of the article): https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG/raw/...
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
Note that if you're on iOS, it's possible that the HTML page doesn't work at all because when it's opened from the filesystem, it's displayed by a viewer which doesn't support JS instead of Safari.
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
It's possible to define the Content Security Policy with a <META> tag in the "bootstrap page" and prevent this kind of security issue, e.g. <META http-equiv="content-security-policy" content="connect-src 'self' data: blob:;">
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
You're right, SingleFile (which is capable of saving pages in this format) does a little better than the demo, but it can also be optimized. In fact, I chose the JSON format to keep things as simple and didactic as possible for the presentation. I think I need to use your suggestions to optimize this structure in SingleFile ;)
gildas··on How to Create HTML/ZIP/PNG Polyglot Files
Note that you can also take advantage of the fact that a ZIP can be password-protected and make your web page secret! For example https://gildas-lormeau.github.io/private/ (password: "thisisapage").
gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
SingleFile respects your privacy, you can find the privacy policy here [1].

[1] https://github.com/gildas-lormeau/SingleFile/blob/master/pri...

gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
I agree that it's debatable, which is why I used the word “almost” ;). The fact remains that this info isn't in RFCs and is hard to find on the web.
gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
The saved page is encoded in windows-1252. It includes "consolidation data" to read the ZIP data as text from the DOM and recover the replacements of \r and \r\n occurrences (this is the only data loss and it represents approx. 1% of ZIP data), see the links below for more info.

https://gildas-lormeau.github.io/Polyglot-HTML-ZIP-PNG/en-EN...

https://gildas-lormeau.github.io/Polyglot-HTML-ZIP-PNG/en-EN...

https://gildas-lormeau.github.io/Polyglot-HTML-ZIP-PNG/en-EN...

gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
I took another approach in SingleFile by offering a way to save pages as self-extracting pages (i.e. ZIP/HTML polyglot files), see [1] for more info.

[1] https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG

gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
I'm actually referring to the "set of modifications" described here [1] and the fact that only Chromium can open (these) MHTML files today.

[1] https://docs.google.com/document/d/1FvmYUC0S0BkdkR7wZsg0hLdK...

gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
Because the MHTML format produced by Chromium can almost be considered as proprietary.
gildas··on Singlefile: A web extension to save a complete web page into a single HTML file
See https://github.com/gildas-lormeau/SingleFile/blob/master/faq...
gildas··on ArchiveBox is evolving: the future of self-hosted internet archives
Thank you so much Niki :). The P2P sharing is a great idea. I really hope this feature will get things moving in the archiving field.
gildas··on WebP: The WebPage Compression Format
In the same vein, you can package HTML pages as self-extracting ZIP files with SingleFile [1]. You can even include a PNG image to produce files compatible with HTML, ZIP and PNG [2], and for example display the PNG image in the HTML page [3].

[1] https://github.com/gildas-lormeau/SingleFile?tab=readme-ov-f...

[2] https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG

[3] https://github.com/gildas-lormeau/Polyglot-HTML-ZIP-PNG/raw/...

gildas··on Create HTML/ZIP/PNG Polyglot Files in JavaScript
Thanks for the upvotes. I've tried to communicate several times about this work here but I can't get any feedback. Please feel free to say what you think. I would really appreciate it.
gildas··on Enhance WASM: Back End Agnostic SSR for Web Components
For my part, I've had exactly the opposite experience. Without SSR or equivalent, you often have to wait weeks for your content to be indexed on Google, and the quality of the results varies. I'm talking about sites of at least several hundred/thousand pages.
gildas··on Monolith – CLI tool for saving complete web pages as a single HTML file
In fact, I've only been making executable files available for a few weeks now. I'll have to see how to distribute them via Homebrew and so on.
gildas··on Monolith – CLI tool for saving complete web pages as a single HTML file
You can find links to sponsor the project here [1] in the section "Sponsor this project" at the bottom right of the page.

[1] https://github.com/gildas-lormeau/SingleFile

gildas··on Monolith – CLI tool for saving complete web pages as a single HTML file
Sorry for the confusion, I was referring to SingleFile run via the command line interface.
gildas··on Monolith – CLI tool for saving complete web pages as a single HTML file
It's officially available on Firefox for Android [1] and Safari [2] on mobile. You might also be able to use it with Kiwi Browser [3] on Android.

[1] https://addons.mozilla.org/android/addon/single-file/

[2] https://apps.apple.com/app/singlefile-for-safari/id644432254...

[3] https://play.google.com/store/apps/details?id=com.kiwibrowse...

gildas··on Monolith – CLI tool for saving complete web pages as a single HTML file
It's documented here: https://wiki.archiveteam.org/index.php?title=Restoring
← PreviousPage 2 of 14Next →