Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gildas
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
gildas
6y ago
There is even Promise.race provided for that purpose in JavaScript. You can typically use it to implement a watchdog.
242.
▲
by
gildas
6y ago
Even though it's not a compiler, SingleFile [1](and SingleFileZ [2]) can do that. It will compute the cascade, remove almost all the unnecessary rules, and minify the CSS. [1] https://github.com/gildas-lormeau/Sing
243.
▲
by
gildas
7y ago
I disagree, I develop SingleFile for 10 years. That's the first time I need to include a script in the saved page in order to display it properly. Until the existence of Web Components, JavaScript was not needed to display a saved page
244.
▲
by
gildas
7y ago
Yes I'm sure. It was a bug in SingleFile [1] and to fix it (I'm the author), I must add a JavaScript script in the saved page to deserialize the shadow root contents that are missing. It means that JS is required to view this save
245.
▲
by
gildas
7y ago
Is it okay for you if you save a webpage but no contents are saved in fact? Do the test and save in HTML (with the native "Save as" feature) this page [1]. The saved page will be almost empty because it's made of web componen
246.
▲
by
gildas
7y ago
To play devil's advocate, note that Google is trying to propose something to make the shadow root contents deserializable without relying on JavaScript [1][2]. [1] https://github.com/mfreed7/declarative-shadow-dom&
247.
▲
by
gildas
7y ago
SingleFile [1] can do that, i.e. automatically save viewed pages and/or bookmarks, but it will save pages in HTML. Alternatively, SingleFileZ [2] can do the same but will produce zip files (disguised as HTML files). Disclosure: I'
248.
▲
by
gildas
7y ago
If the PDF format is not mandatory for you, you might be interested in SingleFile [1] (I'm the author) which you can run from the command line. It will interpret scripts and faithfully save a snapshot of a page in a single HTML file. [
249.
▲
Implement save-page-as-wbn (Web Bundle) feature in Chromium
(crbug.com)
1 points
by
gildas
7y ago
|
0 comments
250.
▲
by
gildas
7y ago
I can understand you prefer the PDF format for saving HTML webpages even though the PDF format is not adapted for this use-case. But do all the pages on the Internet saved with SingleFile weight 250KB and all the pages saved in PDF weight 2
251.
▲
by
gildas
7y ago
Basically, you're right. I found the idea interesting despite the fact that the solution isn't "perfect". For your information, the code used to upload the proof is here [1]. A SHA256 of the content of the saved page is
252.
▲
Store the proof of a webpage saved with SingleFile in Bitcoin
(blog.woleet.io)
107 points
by
gildas
7y ago
|
77 comments
253.
▲
by
gildas
7y ago
Sorry, I didn't see your question. I check the posts on HN very regularly. The title of the post made me think that people might have been talking about SingleFile. Sometimes, friends of mine tell me someone on the Internets is talkin
254.
▲
by
gildas
7y ago
For your information, SingleFile can run on Firefox for Android [1]. [1] https://github.com/gildas-lormeau/SingleFile
255.
▲
by
gildas
7y ago
Hi! I think it confirms that there's a real interest in this feature.
256.
▲
by
gildas
7y ago
I'll implement the "save bookmark page" feature in both extensions :)
257.
▲
by
gildas
7y ago
Or SingleFileZ files which can be viewed without installing any extension https://github.com/gildas-lormeau/SingleFileZ . Edit: it can also auto-save pages, like SingleFile.
258.
▲
by
gildas
7y ago
I think you could add the browser add-on SingleFile [1] to the list which allows you to annotate archive of webpages saved in HTML and is 100% free. [1] https://github.com/gildas-lormeau/SingleFile
259.
▲
Get Started with Web Bundles
(web.dev)
7 points
by
gildas
7y ago
|
0 comments
260.
▲
by
gildas
7y ago
SingleFileZ creates its own paths to reference all the resources of the page in the zip. This prevents any invalid path issues. The URL of the resource is stored as a comment for each entry in the zip though (I'm unsure I'm really
261.
▲
by
gildas
7y ago
Actually, what is supposed to be interesting and innovative in SingleFileZ is the fact that it produces self-extracting valid zip files in the form of HTML files. Thus, they can be read natively by any modern browser that supports JavaScr
262.
▲
by
gildas
7y ago
Thank you for your feedback. The additional 40KB corresponds to the part which self-extracts the zip file (in order to view the page without installing any extension). Note that the original URLs can be found in the comments of each entry i
263.
▲
by
gildas
7y ago
Yes you can. See this page for example: https://gildas-lormeau.github.io/ (check the source code of the page if you're curious). It was saved with SingleFileZ and is served via a HTTP server. Note that you don't n
264.
▲
by
gildas
7y ago
The main benefit is the size of the saved page. The file will be smaller because binary resources (e.g. images) are not encoded in base 64 [1]. Moreover, the page and these resources are also compressed. The other benefit is that you can un
265.
▲
by
gildas
7y ago
I included in the table only formats that are at least supported natively in one modern browser. That's why the WARC format is missing. I'm not against adding it in the table though.
266.
▲
by
gildas
7y ago
Thank you. I could not reproduce your issue on the latest versions of Chrome and Firefox. I'll try to do more tests to see what went wrong on your end.
267.
▲
by
gildas
7y ago
It is not supported by Safari neither. Today, the only modern browsers supporting MHTML are Chromium-based browsers.
268.
▲
by
gildas
7y ago
I'm the author of the extension. Browsers don't offer a way to register a (browser) extension with a given mime-type or filename extension. That's why SingleFileZ uses the HTML format to wrap the zip content.
269.
▲
by
gildas
7y ago
> I automatically assume JavaScript developers to be completely oblivious to this entire class of software development knowledge. Surprisingly, In JavaScript the technique described in the article is quite efficient on Firefox whereas t
270.
▲
by
gildas
7y ago
Unfortunately it's not written in Rust so it won't make the first page of HN.
More ›