3 ms·
One issue with MHTML is that it does not seem to be currently supported by iframes. The use case I was working on was comparing search results from Google and D
by bhl 7y ago
One issue with MHTML is that it does not seem to be currently supported by iframes. The use case I was working on was comparing search results from Google and DuckDuckGo by simply scraping and downloading to later embed. For that, I used a cli tool from an open source library [1]. MHTML seems like a nice format but I'm not sure if there's a library to convert them into stand-alone HTML files.
[1] https://github.com/gildas-lormeau/SingleFile https://github.com/gildas-lormeau/SingleFile
Edit: This question just came to mind. If MHTML saves images using base64, and base64 dataurl images have a limit size, how would you save extremely large photos? Take for example the cover image of this article https://story.californiasunday.com/gone-paradise-fire https://story.californiasunday.com/gone-paradise-fire. When I saved the page in MHTML format, the re-rendered image showed up quite blurry compared to the original. Was the size limit the cause?
[2] https://stackoverflow.com/questions/12637395/what-is-the-size-limit-of-a-base64-dataurl-image https://stackoverflow.com/questions/12637395/what-is-the-siz...
- app4soft 7y ago> One issue with MHTML is that it does not seem to be currently supported by iframes. There no needs to insert MHTML page into IFrame! If you need insert MHTML content into IFrame, just convert it to HTML+JS firstly.
- Springtime 7y ago> MHTML seems like a nice format but I'm not sure if there's a library to convert them into stand-alone HTML files. Many years ago used a program that could convert them but the name escapes me. A brief search shows a few results that appear to do a similar conversion, potentially they may be of use. > This question just came to mind. If MHTML saves images using base64, and base64 dataurl images have a limit size, how would you save extremely large photos? From what I've read there's no official limit for base64 encodings though IE/Edge limit them to 4GB according to caniuse.com. Haven't personally encountered an image or GIF that was too large not to be saved in an MHT (I have over 10k MHTML files saved, some image and GIF heavy ones up to 200MB each). Also a sibling comment corrected me about the data URI use, MHTML uses a separate scheme but nevertheless still uses base64 for encoding. For that example article you linked it seems likely to be the way the program you're using is handling the Javascript-loaded images. I saved it in Vivaldi (Blink-based engine) and the main image displayed at full res when opened locally while the other images didn't, while when saved with a pre-Quantum Firefox using the UnMHT addon it saved all the images at their fully loaded resolutions. Some MHTML saving implementations clearly have advantages over others it would seem.