3 ms·
Unfortunately I don't think browsers handle opening MHTML well out of the box. At least last time I checked in only worked for local paths (file://) and only s
by lacop 2y ago
Unfortunately I don't think browsers handle opening MHTML well out of the box.
At least last time I checked in only worked for local paths (file://) and only some browsers. Otherwise it would either try to download or just show plain text.
I ended up using Chrome to dump to MHTML [1] and then reshuffle the content into individual files, rewriting the path references and fixing mime types [2]. That gives a reasonably faithful static capture of a page that can be shared as link.
[1] https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-captureSnapshot https://chromedevtools.github.io/devtools-protocol/tot/Page/...
[2] https://github.com/lacop/udrb/blob/master/app/src/chrome/mod.rs#L116 https://github.com/lacop/udrb/blob/master/app/src/chrome/mod...