Chromium Code Reviews
DescriptionSave Page As MHTML
--save-page-as-mhtml disables saving pages as html-only and complete with sub-resources in a sibling directory, and enables only saving pages as complete with sub-resources in a single MHTML (MIME-HTML) text file.
The SavePackage class supports all three options, wich will allow saving complete pages to gdata, and may simplify file management for users.
If few enough users need the many-files option, we may be able to remove it and most/all of the SavePackage system.
The generated MHTML is viewable in Chrome on all 4 OSs and Opera (at least on windows).
The generated MHTML is not viewable in chrome when loaded via http[s], only via file://. http://code.google.com/p/chromium-os/issues/detail?id=28654
Chrome recognizes both '.mht' and '.mhtml' as MHTML, however '.mhtml' is more google-able, so that is the default extension when saving MHTML files. Chrome does not sniff '.html' files to see if they are actually MHTML, so it will incorrectly render such mis-named MHTML files.
It is not viewable in Firefox. Firefox tries to help you either open it in another program or download it. There are extensions that provide support for MHTML: MAFF, and UnMHT are two.
It is not viewable in Safari. Safari does not recognize "mht" or "mhtml" as extensions that it can render. Changing the extension to "html" allows Safari to open it, but Safari does not seem to understand the file format so it's rendered incorrectly. A port of UnMHT is available for Safari.
It is not viewable in IE: The webpage cannot be displayed. Most likely cause: •Some content or files on this webpage require a program that you don't have installed.
IE supports MHTML, so it may be possible to tweak the mhtml generator to appease both Opera and IE. http://crbug.com/125477
Regarding OOMs: about:memory showed no change when I saved cnn.com as mhtml (1.4MB), so if there was a spike, it either lasted <200ms or was lost in the noise.
BUG=120416
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135390
Patch Set 1 #Patch Set 2 : " #
Total comments: 14
Patch Set 3 : uma #Patch Set 4 : uma #Patch Set 5 : comment #Patch Set 6 : force extension mht #Patch Set 7 : browsertest #Patch Set 8 : whitespace #
Total comments: 14
Patch Set 9 : comments #
Total comments: 17
Patch Set 10 : comments #Patch Set 11 : --save-page-as-mhtml #Patch Set 12 : rm IDS_SAVE_PAGE_DESC_MHTML #
Total comments: 2
Patch Set 13 : cros #
Total comments: 10
Patch Set 14 : reconnect gdata #Patch Set 15 : " #Patch Set 16 : ... #Patch Set 17 : " #Patch Set 18 : " #Patch Set 19 : route mime_type, set temporary #Patch Set 20 : mock download manager fix #Patch Set 21 : nonconst nonref params #
Total comments: 20
Patch Set 22 : chromeos gdata works #Patch Set 23 : non-cros works #
Total comments: 13
Patch Set 24 : comments, test #Patch Set 25 : comment #Patch Set 26 : coverity #Patch Set 27 : comment in GDataDownloadObserver #
Total comments: 5
Patch Set 28 : -osall, extract_actions.py #
Total comments: 11
Patch Set 29 : avoid re-entering #
Total comments: 11
Patch Set 30 : " #
Total comments: 2
Patch Set 31 : SavePackage*Callback #Patch Set 32 : comment #Patch Set 33 : merge #
Total comments: 4
Patch Set 34 : : #Patch Set 35 : " #Patch Set 36 : kFileSize=2759 #Patch Set 37 : merge #Patch Set 38 : merge #Messages
Total messages: 79 (0 generated)
|