Last Comment Bug 18764 - Full rfc2557 MHTML multipart/related support in BROWSER
: Full rfc2557 MHTML multipart/related support in BROWSER
Status: RESOLVED WONTFIX
[Hixie-PF]
: helpwanted
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: All All
: -- enhancement with 170 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
: 52386 108329 176054 177713 241240 268151 275302 278968 392732 407599 445761 448960 471270 509285 538108 603476 1028603 (view as bug list)
Depends on:
Blocks: 40873 82118 169359
  Show dependency treegraph
 
Reported: 1999-11-13 00:58 PST by Sean Richardson
Modified: 2015-12-11 17:23 PST (History)
110 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
This Page as MS MHTML (60.74 KB, text/plain)
2003-01-29 12:37 PST, Frank
no flags Details
More Complex Testcase with Frames (94.34 KB, application/zip)
2003-01-29 12:57 PST, Frank
no flags Details

Description Sean Richardson 1999-11-13 00:58:08 PST
The discussion in Bug 17309 "Wait for primary style sheets before constructing
frames" seems to have gotten bogged down - it seems obvious that no matter
what the final decision is on what to do and how to do it, it can't
be exactly what everyone would want.

Unless the decision is to always block display "forever" while waiting for all
primary style sheets to arrive, which would be sure to vex some, some pages
that cannot be properly displayed will be displayed anyway.

Ensuring that the browser has full rfc2557 MHTML support would provide a viable
mechanism for ensuring that LINKed stylesheets arrive with the documents
they apply to: those who absolutely *need* the stylesheets to arrive before
rendering could send an MHTML document instead on the basis of appropriate
content-negotiation. This would ensure that the HTML, and thinking forward,
XHTML and XML, documents could be made available with certainty that the
necessary stylesheets would be present at page layout time.

This would provide an "escape valve" of sorts to make sure that the issues
in bug 17309 do not become overpressurized. If this feature request is not
adopted, the "correct" fix for 17309 becomes very important due to the lack
of a viable alternative, on the page author's part, to hoping that the
browser does the right thing in even the most adverse conditions (say,
just after another railway crash that takes out a fiber run).

Whether any webserver available now can assemble an MHTML document on the fly
is unknown; whether authors would be willing to use tools to "precompile"
MHTML documents is also unknown.

Quoting from the RFC:
"While initially designed to support e-mail transfer of complete
multi-resource HTML multimedia documents, these conventions can also
be employed to resources retrieved by other transfer protocols such
as HTTP and FTP to retrieve a complete multi-resource HTML multimedia
document in a single transfer or for storage and archiving of
complete HTML-documents." <URL:http://www.faqs.org/rfcs/rfc2557.html>

Regardless of anything else, it is probably a good thing for the browser
to fully support rfc2557 MTHML for maximum flexibility and to open up
future options, particularly regarding XML.

I do see a downside: any simple way of implementing this would be very
cache-inefficient, and any way that would be cache-efficient could conceivably
add enough complexity to require extentions to HTTP.
Comment 1 Sean Richardson 1999-11-13 09:16:59 PST
Copied the following comment from bug 17309 (cc-ing contributor):
>------ Additional Comments From dbaron@fas.harvard.edu  11/13/99 07:03 ------
>Authors could add the proprietary "important" keyword to the list of keywords
>in the rel attribute of the link element, e.g., rel="important stylesheet" (or
>rel="stylesheet important") to do what you want without resorting to RFC2557.

Yes, they could, but they would have no guarantee that Mozilla or any other
browser would either interpret that they way they want or implement the
behaviour they want in response, nor that a future version would not do
something slightly or markedly different.

Providing an rfc2557 MHTML mechanism would take care of the extreme case,
leaving room for a reasonable policy for "important stylesheet" that would
not necessarily mean "absolutely required" from this point forward.

Having said that, I absolutely would not advocate MHTML in the browser as the
*only* mechanism provided to authors to indicate how important or necessary
a stylesheet is, lest this feature get thought of by anyone as the only way
to go. I'd go so far as to say don't add the feature if nothing else is
provided as a fix for bug 17309.
Comment 2 leger 1999-12-13 16:38:59 PST
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.
Comment 3 Gagan 2000-03-15 19:15:25 PST
->ruslan
Comment 4 ruslan 2000-03-21 10:27:28 PST
I don't know how easy it'll be implement. Basically when we open the channel - 
we would ask for /foo.html. If that contains 3 htmls, but not one - we'll have 
to invent a way to deal with it.
Comment 5 ruslan 2000-04-04 00:10:40 PDT
Per warren's decision -> nobody
Comment 6 leger 2000-05-25 15:02:20 PDT
Putting on [nsbeta2-] radar.  
Comment 7 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2000-05-31 09:35:07 PDT
Marking helpwanted since that's what I think was meant by "-> nobody".
Comment 8 benc 2001-05-21 16:11:14 PDT
Open Networking bugs, qa=tever -> qa to me.
Comment 9 Peter Lairo 2001-05-22 08:03:32 PDT
This sounds like it would be a MAJOR step toward being able to save (and send)
entire HTML pages as ONE file to disk - great.

Suggest keyword: mozilla0.9.2
Comment 10 Peter Lairo 2001-05-22 08:30:29 PDT
I created a tracking (meta) bug 82118 to track these kinds of bugs and to unify
the efforts.

Maybe a few duplicates will also become aparent this way - then we can assign
the keyword MostFreq.
Comment 11 Alex Bishop 2001-05-22 10:50:24 PDT
Removing dependancy to bug 82118 as it should be the other way round (bug 82118
depends on this bug).
Comment 12 Andreas M. "Clarence" Schneider 2001-06-11 19:26:38 PDT
I'll try to implement this, but I do not know yet if I really have the skills
to do it. Be prepared that I may have to give this back to nobody@mozilla.org.

My plan is roughly this:

- Implement a mhtml: protocol handler similar to the jar: handler.
- Implement a stream converter similar to the multipart/x-mixed-replace converter.
- Implement a method to control pending loads.

The stream converter would return the root resource within a mhtml channel and
put the other parts into a cache. On every page load we'd have to check if the
referring URI has a mhtml scheme and if so, translate the URI to be loaded into
a mhtml: URI.

The mhtml channel would simply fetch from cache if the requested resource is
available. If the containing multipart resource is still loading, it would
wait until it becomes available. If the requested resource wasn't included in
the multipart resource, try to get it using the original URI.

If the requested resource isn't in the cache and the containing multipart
resource is not currently loading, we'd have to load it using basically the same
mechanism the stream converter is using.
Comment 13 Andreas M. "Clarence" Schneider 2001-06-11 19:27:38 PDT
Assign to myself, not nobody.
Comment 14 Hixie (not reading bugmail) 2001-06-14 18:48:38 PDT
Why do you need a new protocol handler? If I go to
   http://www.example.org/mydocument.mhtml
...I would want it to display right without changing the URI.

BTW, if you _do_ use your own protocol, then it should be called 'moz-mhtml' o
whatever, so as not to polute the protocol namespace.
Comment 15 Andreas M. "Clarence" Schneider 2001-06-14 22:50:54 PDT
Ian, somehow we must remember that we have an MHTML document if we don't want to
rewrite its links. URIs in MHTML documents can be the same as existing URIs
outside the MHTML document. If we rewrite the links (e.g. convert them to <cid:>
URIs) it is very likely that we break at least some JS.

It may be possible to keep the original URI for the root resource, but it would
require more changes to docshell. I do not intend to implement this in the first
step. Please file a bug on it once MHTML works.

If we display a resource other than the root resource (e.g. open a frame in a
new window), it does not make sense to keep the original URI and it does not
make sense to show the given URI, because the displayed document may be
different from a document with the same URI retrieved directly over the net.
Another approach would be to generate a Content-ID ourselves if the MHTML
document doesn't specify it and use <cid:> instead of <mhtml:>. But that would
be much more difficult to implement.

Name of the protocol: We do already pollute the protocol namespace (<jar:>,
<view-source:>, <about:>, <internal:>, <chrome:>, <resource:>, <javascript:>).
But if you think we shouldn't continue this it would be no problem to use
<moz-mhtml:>.
Comment 16 Andreas M. "Clarence" Schneider 2001-06-14 23:16:50 PDT
A clarification: If http://www.example.org/mydocument.mhtml has Content-Type:
multipart/related you could of course type that URI into the URL bar or use it
in a link. But it would then change to
mhtml:http://www.example.org/mydocument.mhtml!/ or
mhtml:http://www.example.org/mydocument.mhtml!/http://another.example.com/
(if the root resource has Content-Location: http://another.example.com/ ).
This is similar to an HTTP redirection.
Comment 17 Sean Richardson 2001-06-15 13:13:38 PDT
Clarence, first, thanks for giving this a try. From a quick look at my inbox, 
at least some HTML mail uses multipart/related, instead of multipart/mixed,
so MailNews may already have some of the code you need.

As a start, try this LXR query:
  http://lxr.mozilla.org/seamonkey/search?string=multipart%2Frelated
and especially look at 
http://lxr.mozilla.org/seamonkey/source/mailnews/mime/src/mimemrel.cpp#29
and following, where rhp@netscape.com has some implementation notes about
how to handle multipart/related data.
Comment 18 Andreas M. "Clarence" Schneider 2001-06-15 16:14:26 PDT
I know the MHTML code for mail. But I think it needs nearly a complete rewrite
to work outside of mail and to support all HTML features (e.g. frames).
The first implementation note in mimemrel.cpp describes basically the way I'm
going to implement this.
Comment 19 Tomer Cohen :tomer 2001-10-22 14:08:44 PDT
What's going on with this bug?
Comment 20 Markus Gerstel 2001-11-03 09:09:34 PST
*** Bug 108329 has been marked as a duplicate of this bug. ***
Comment 21 matteo porta 2002-03-06 15:38:13 PST
now i see that this bug is targetted for mozilla 1.1
i really hope that it won't be postponed again.
thanks.
Comment 22 stig hackvan 2002-03-13 21:28:03 PST
I'm finding content on the net encoded in this format with .mht file
extensions...and I'd like to use the format myself to encapsulate saved web
pages...hmmmmmmmmm, for that matter, file->"save as" {c,sh}ould save the file
and  it's images in one blob.  this seems like a half-decent-enough format
(except that it mime-encodes images so they bloat)...okay, then .mht.gz...(yeah,
there's .war too [from konqueror])
Comment 23 Stephan Hohe 2002-10-25 11:59:53 PDT
target milestone 1.1alpha is out of date...
Is there any progress going on?
Comment 24 Boris Zbarsky [:bz] (still a bit busy) 2002-10-25 12:59:32 PDT
*** Bug 176054 has been marked as a duplicate of this bug. ***
Comment 25 Boris Zbarsky [:bz] (still a bit busy) 2002-10-31 09:48:57 PST
*** Bug 177713 has been marked as a duplicate of this bug. ***
Comment 26 benc 2002-11-04 13:10:58 PST
Is this networking of file handling?
Comment 27 Chris Carlin 2002-11-04 13:18:35 PST
Pardon me if I'm wrong, but it seems to be that this is under both networking
and filehandling.

My main want is to be able to open a single file (whether it be downloaded from
an ftp site or opened from my desktop) with all graphics, stylesheets, and html
included.
Comment 28 Boris 'pi' Piwinger 2002-11-06 08:57:11 PST
Is there a testcase available somewhere?

pi
Comment 29 石庭豐 (Seak, Teng-Fong) 2002-11-10 13:47:43 PST
Sorry, I haven't (time to) read RFC2557, but I'd like to make a wish:
when MHTML is opened (in browser), it would be nice if the From, Date, etc
fields aren't displayed.

Excuse-me if this wish isn't adequate and doesn't seem to be within topic of
this bug because my bug got being marked as a dup of this.
Comment 30 Frank 2003-01-29 12:37:55 PST
Created attachment 113008 [details]
This Page as MS MHTML

This page saved with MS IExplorer (6)
Comment 31 Frank 2003-01-29 12:57:52 PST
Created attachment 113016 [details]
More Complex Testcase with Frames

After upgrading from MS Internet-Exploder to Mozilla (security reasons) I
really miss the MS-Feature of saving complete Webpages into one single File.
With a huge collection of documents on your hard drive it matters very much how
the files are organized and structured. I hope this issue will get a higher
priority. I wonder why Netscape/Mozilla did not make a progress in that
direction for years.
Frank
Comment 32 Chris Carlin 2003-01-29 18:34:48 PST
One of the main reasons I want such a thing is so that I can use Mozilla and its
composer for writing general reports.

Basically I propose that there are few examples of report styles, formats, and
uses that wouldn't be entirely handled by HTML/XML/CSS/etc. There just aren't
any particularly good front ends for writing these reports.

Anyway, I want to be able to view, print, and edit my reports on computers
without bothering with a word processor at all. I SHOULDN'T need anything other
than Mozilla, but this bug makes transmission of such documents more cumbersome.

In the end this is one of those feature requests where the potential uses are
nearly limitless in number.
Comment 33 Thomas Stein 2003-06-07 05:27:22 PDT
I tried out Mozilla a couple of times. But the most important reason for me to 
stay with IntExp is the lack of saving web pages into a single file.
I wonder wether there is no progress on this topic for years.
It should be easy to implement this feature in comparison to other projected 
items on the todo list.

Thomas
Comment 34 Jean-Marc Molina 2003-07-02 14:44:06 PDT
As a developer I can tell you it's not that easy ! However I think Mozilla
developers could use some help so here goes a useful link :
http://www.codeproject.com/shell/IESaveAs.asp

The article contains useful information about IE and its so famous (^^) save as
MHTML feature . Developers should also read the user comments. 
Comment 35 Sebastian Redl 2003-10-28 09:10:29 PST
>somehow we must remember that we have an MHTML document if we don't want to
>rewrite its links. URIs in MHTML documents can be the same as existing URIs
>outside the MHTML document. If we rewrite the links (e.g. convert them to <cid:>
>URIs) it is very likely that we break at least some JS.

How does IE do it?
Comment 36 Pedro Lamarão 2003-11-21 12:18:35 PST
Me, and my employer, are interested in the implementation of this feature.
If there is no one working on it, or if there is someone working on this having
trouble, I'd like to give it a try.
So, feel free to contact me with pointers about how to go about it.
Comment 37 Frank 2004-02-28 02:24:58 PST
I changed from IE to Mozilla just for security reasons. I'm still missing this
nice MHTML feature. There are many HTML documents with important inline
graphics, like pages with embedded math formulas as GIF or graphs. 
For me it's not important that all features of a web page are preserved.
Javascript can be broken, that's not important to me as it's used mostly for
advertisements. Also I don't care much about CSS as the content is more
important to me as a correct layout. This topic is discussed now for more than 4
years. So, maybe a simple approach at the beginning would be sufficient. The
mail component is using already a similar functionality. Javacript/CSS, external
Link and Layout optimizations can be made later. 
Comment 38 Biju 2004-03-21 18:30:03 PST
(In reply to comment #37)
> I changed from IE to Mozilla just for security reasons. I'm still missing this
> nice MHTML feature. There are many HTML documents with important inline
> graphics, like pages with embedded math formulas as GIF or graphs. 
> For me it's not important that all features of a web page are preserved.

Actually Moz… is at least capable of viewing *.mht files created by IE. I tried
following.

1. in IE. Opened a web page with graphics
2. saved it as *.mht file
3. Opened a new message in Thunderbird
4. Attached the *.mht file
5. save the message as draft
6. view the saved draft message in preview pane
7. I am able to see the complete web page with graphics and css

If Thunderbird is capable of viewing a *.mht Mozilla.org has code to show it in
the browser.

But I dont whether there is code to save it!!

Alternative, Mozilla is capable of viewing contents inside a zip file (including
pages with graphics and css). So why not make a XPCOM component to update zip,
then extension developers can use that to make a single file achieving facility.

See topic http://forums.mozillazine.org/viewtopic.php?p=442473
Comment 39 Frank 2004-03-30 13:12:49 PST
When I should make a ranking about the most important improvements in Mozilla
browser, this one would be on Nr. 1. 
I like mozilla, but not for the fact that it makes my document folders
absolutely chaotic with all the subfolders of page contents - really stupid.
Maybe we should convince some active developers to look at this issue and forget
about other things like making Mozilla look even more beautiful. Unfortunately
the Internet Explorer is no alternative to me because of the security problems.
Otherwise I would have changed back again, because IE is able to properly save
web pages.


Comment 40 Biju 2004-04-07 21:59:26 PDT
At present mozilla allow to view STUFF from a zip file. 
STUFF may be a web page saved as "Web page, complete" format.

see following

jar:http://www.geocities.com/bijumaillist/mozilla/mozilla.zip!/mozilla.htm

(if your are unable to see it try
http://geocities.com/bijumaillist/go.html#jar:http://www.geocities.com/bijumaillist/mozilla/mozilla.zip!/mozilla.htm
or the snipped url http://snipurl.com/56pg )

Now all we need is an option to zip the contents of "Web page, complete" format
while saving.

(PS: at present the mozilla zip services dont allow to add/update file in a zip
file)

one advatage of zip format over mhtm is we can access content using any ziptool
and it is a non XML format.
disadvantage is zip file format dont store mime-type info of contained files
to resolve this we could store an additional content list file (say content.lst)
which list file names inside the archive and its mime-type.
content.lst should also contain an entry to indicate the root html file.
content.lst should NOT be in XML format.
XML is difficult to process using shell script
Comment 41 Chris Carlin 2004-04-07 22:43:30 PDT
(In reply to comment #40)
> At present mozilla allow to view STUFF from a zip file. 
> STUFF may be a web page saved as "Web page, complete" format.

Of course you realize this would be an entirely different enhancement request...

A zipped file as you describe isn't rfc2557 MHTML.
Comment 43 Biju 2004-04-12 21:01:39 PDT
(In reply to comment #41)
> A zipped file as you describe isn't rfc2557 MHTML.

I know…
But my frustration this bug/enhancement is reported on 1999-11-13 00:58 PDT
And I know *.mht can be viewed in thunderbird.

Regarding security issue, contents of the *.mht file, or of *.zip file should
run under same security as html file hosted at same website.
Comment 44 Stefan Borggraefe 2004-04-21 12:13:29 PDT
*** Bug 241240 has been marked as a duplicate of this bug. ***
Comment 45 Adam Katz 2004-04-22 21:06:43 PDT
re: comment 40:  zip format is discussed in bug 64286.

re: comment 43:  we need a complete re-write to support mhtml in the browser.
(see comment 18, where the bug assignee, Clarence, notes this.)

biggest problem with this bug is that nobody is actively working on it,
just a lot of us actively watching it as it sits there smiling back.
Comment 46 Christopher Ottley 2004-07-01 06:09:48 PDT
MAF (http://maf.mozdev.org/) is an extension which might be useful.
Comment 47 Christian :Biesinger (don't email me, ping me on IRC) 2004-09-26 06:40:46 PDT
actually, I'm not going to continue working on this... I stopped when I realized
I'd need a streaming base64 decoder
Comment 48 Frank 2004-10-23 04:19:08 PDT
Did you already notice that MAF can load and save MHTML ?

http://maf.mozdev.org/

My IE-Saved files were displayed correctly and saved Files
could open in IE later.

So, the only thing to do is to integrate that basic function
into the core of Mozilla. Up to now it needs some external programs
and scripts.

Also a decision about a standard format would be nice.
I don't trust the MAFF format now, because who knows how
long this will be supported. MTHML has a disadvantage because
it's uncompressed. So a .mht.zip or .mhtz would be nice.
If this would dissapear, at least with unzipping the docs
could convert easily into the RFC-standardized MTHML.
Comment 49 Biju 2004-10-24 19:27:15 PDT
(In reply to comment #47)
> actually, I'm not going to continue working on this... I stopped when I realized
> I'd need a streaming base64 decoder

Please check window.atob() and window.btoa() function are useful or not
Comment 50 Bill Mason 2004-11-06 12:45:34 PST
*** Bug 268151 has been marked as a duplicate of this bug. ***
Comment 51 Bill Mason 2004-12-19 16:49:58 PST
*** Bug 275302 has been marked as a duplicate of this bug. ***
Comment 52 Mike Connor [:mconnor] 2005-01-19 06:56:56 PST
*** Bug 278968 has been marked as a duplicate of this bug. ***
Comment 53 Jürgen Weber 2005-10-09 10:56:11 PDT
(In reply to comment #48)
> Did you already notice that MAF can load and save MHTML ?
> 
> http://maf.mozdev.org/
> 
Unfortunately MAF does not work with 1.5 Betas anymore.
Comment 54 C.S. Chen 2005-11-04 13:17:42 PST
(In reply to comment #53)
> (In reply to comment #48)
> > Did you already notice that MAF can load and save MHTML ?
> > 
> > http://maf.mozdev.org/
> > 
> Unfortunately MAF does not work with 1.5 Betas anymore.

It works if you override MAF's Firefox version checking. Nightly Tester Tools can help you do this. Developers of MAF still should update their package, though...
Comment 55 emmanuel poirier 2005-12-04 13:37:09 PST
Hi,

yes mhtml exporting and loading is a good thing: no need to have several files lying around with the main html page.
Comment 56 Darin Fisher 2006-02-09 14:18:49 PST
-> nobody
Comment 57 Eyal Rozenberg 2006-05-22 14:28:40 PDT
*** Bug 52386 has been marked as a duplicate of this bug. ***
Comment 58 Cees T. 2006-08-29 04:59:17 PDT
(In reply to comment #48)
> I don't trust the MAFF format now, because who knows how
> long this will be supported. MTHML has a disadvantage because
> it's uncompressed. So a .mht.zip or .mhtz would be nice.
> If this would dissapear, at least with unzipping the docs
> could convert easily into the RFC-standardized MTHML.
> 

MAF uses a custom "Save as, complete" function that puts the result and a metadata RDF file in timed folder in a ZIP file. If you want to view it in a different app, just unzip, enter the folder you want (you can add pages to an existing MAFF), and open index.html.

MAF's MHT output differs from IE though. There are some unexplained options to tweak that.
Comment 59 Ho Fung Wong 2006-09-03 23:16:24 PDT
It's really a shame that mozilla do not try their best to support MHTML...
Its a reason why many people still uses IE
Comment 60 Cees T. 2006-09-05 01:32:05 PDT
Why is this not a duplicate of bug 40873? I think networking downloads pages just fine. Or are the missing items supposedly fixed by https://addons.mozilla.org/firefox/2925/ the issue here?
Comment 61 Byron Jones ‹:glob› [PTO until 2016-10-10] 2006-09-05 01:43:38 PDT
(In reply to comment #60)
> Why is this not a duplicate of bug 40873?

that's about saving, this is about viewing.
Comment 62 Stephanie Daugherty [:sdaugherty] 2006-11-20 15:28:58 PST
Adding myself as CC, IMHO this needs to be a high priority - the current functionality for saving pages to disk is seriously lacking, and this is something that IE has done correctly for a long time.

The votes for this bug show a strong demand for this feature, but apparently, the people most interested in having this functionality aren't in a position to implement it.

Could we please get some developer attention here, it would be nice to have this make it in to a release soon.

Comment 63 Dave Townsend [:mossop] 2007-08-18 11:29:28 PDT
*** Bug 392732 has been marked as a duplicate of this bug. ***
Comment 64 Marcus 2007-08-31 21:05:13 PDT
It's a little sad that there is an addon for Firefox that gives us this, yet the browser cannot have it by default.

IE and Firefox don't have a shared format for single-file web pages. Having support for this format would be excellent. It is the type of file a browser should be able to open.
Comment 65 j.j. 2007-09-02 20:17:46 PDT
BTW, Opera 9 has full support for .mht files.
Comment 66 Dave Townsend [:mossop] 2007-12-09 11:04:10 PST
*** Bug 407599 has been marked as a duplicate of this bug. ***
Comment 67 John Traynor 2007-12-09 11:12:14 PST
Sorry my current report was a duplicate.  I've now scanned this history and frankly find it amazing that the 'bug' has been around over 8 years.
Comment 68 Peter Lairo 2008-06-07 02:28:23 PDT
Could someone please add "viewing" and "Display" to the subject, in order to avoid confusion between this bug (View/Display MHTML) and bug 40873 (Save MHTML).

Old: Full rfc2557 MHTML multipart/related support in BROWSER

New: Display/View MHTML in BROWSER (Full rfc2557)

BTW: I lost a potential convert from IE to Firefox today because he saves recipes from e.g., http://www.verybestbaking.com/recipes/detail.aspx?ID=18476 as MHTML files to his hard drive. Firefox can't do MHTML, and Fx offers a silly default filename ("detail.aspx.htm"). So I lost a "customer". :-(
Comment 69 石庭豐 (Seak, Teng-Fong) 2008-06-09 07:05:16 PDT
I don't think it's necessary to change the title since a full RFC2557 support implies view/display.
Comment 70 Thomas Bertels 2008-06-09 11:00:28 PDT
I think what 石庭豐 means is that full RFC2557 support = view + save, so this bug bug covers bug 40873.
Comment 71 石庭豐 (Seak, Teng-Fong) 2008-06-09 14:03:47 PDT
Yeah, the majority of RFC2557 talks about how to parse and interpret the content (eg section 8).  If that's not for display (and save), what's the use of support it? :)
Comment 72 John Vivirito 2008-07-13 18:08:33 PDT
This has also been reported to Launchpad bug tracker for Ubuntu.
https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/240133
Comment 73 Matthias Versen [:Matti] 2008-07-17 07:57:25 PDT
*** Bug 445761 has been marked as a duplicate of this bug. ***
Comment 74 Dave Townsend [:mossop] 2008-08-03 11:48:09 PDT
*** Bug 448960 has been marked as a duplicate of this bug. ***
Comment 75 suhas patil 2008-09-09 06:34:41 PDT
Actually, not only being able to save the page in mhtm format is helpful but even sending the page from the webserver is equally useful. This feature would drastically cut down time taken for loading multiple web requests for different resources and the overhead of creating and breaking down the connection. Considering it is such a useful and powerful feature, it is surprising that even google's chrome has not supported it.
Comment 76 :aceman 2008-10-03 10:54:01 PDT
Hi, is it correct that this bug is in the 'Networking' component?
Comment 77 Ho Fung Wong 2008-12-08 13:25:51 PST
When can this bug be finally fixed?
Comment 78 Bret Mogilefsky 2008-12-08 14:00:07 PST
Those who are still running into periodic need to view .mht files (like those my HR insists on sending me when they find a resume for me on the web) may be interested to know about this add-on:
http://www.unmht.org/unmht/en_index.html

I'm not sure when it came on the scene, but it's now indispensible... Seemed to work pretty well in all occasions I've had to try it so far.
Comment 79 Matthias Versen [:Matti] 2008-12-27 11:24:49 PST
*** Bug 471270 has been marked as a duplicate of this bug. ***
Comment 80 Mardeg 2009-08-08 23:27:31 PDT
*** Bug 509285 has been marked as a duplicate of this bug. ***
Comment 81 石庭豐 (Seak, Teng-Fong) 2009-12-08 16:11:23 PST
Just tried the add-on.  I have to give it a "thumb up"!
... Although there's pitfall to avoid: conflict with "IE tab" and have to disable a special URL.  It's written in the webpage... at about the very last part of it (not easy to spot it if one has no idea what to look for)
Comment 82 Kevin Brosnan 2010-01-06 01:39:25 PST
*** Bug 538108 has been marked as a duplicate of this bug. ***
Comment 83 Alex 2010-02-22 00:40:22 PST
I need that feature.
Comment 84 Michael Newton 2010-02-22 08:35:25 PST
I think this bug after 11 years should be WONTFIX, given the addon mentioned in comment 78 works great, and this is clearly not on the developers' priority list. I voted for it but I'm well aware that this is not a feature wanted or needed by the vast majority of users. Parity with IE is not always a good enough reason to spend time developing a feature. Especially when there are addons capable of doing the job.
Comment 85 Thomas D. (currently busy elsewhere; needinfo?me) 2010-02-22 12:25:46 PST
(in reply to comment 84)
I doubt very much that a bug with as many as 165 votes, continuous requests for a period of 11 years so far and with recent duplicates still coming in is a likely candidate for wontfix. Maybe fix would be better.

Addons can't replace vital core functionality. Many users will never bother installing addons, but they still need and expect the functionality.

Michael, where's your data to show this isn't needed by many users?

Finally, please consider that the lack of "parity with IE" in this case means that users who already use Firefox might be tempted to switch back to IE both for viewing and saving all-in-one rfc2557 MHTML files. I'll take it a step further and state that both MHTML and .maff format should be natively supported by the browser. Only after many years of using FF did I discover .maff add-on, and I'm not very shy of addons. Current default of saving html pages as a "file + loads of files in subfolder" set is very impractical and resource-wasting. Let alone all the problems you can get when copying over-long file paths resulting from saved html files. Mozilla should really do better.
Comment 86 Thomas D. (currently busy elsewhere; needinfo?me) 2010-02-22 12:29:14 PST
(In repetition of comment #76)
> Is it correct that this bug is in the 'Networking' component?
Comment 87 Lance Baker 2010-04-18 17:47:58 PDT
MHTML is not an approved standard. It is a Microsoft idea that other browser developers have followed. Whether Firefox follows the trend or not is a choice. If they don't, it is not a bug. We already have Zip to archive web pages and related objects. Using an add-on to do the archive from within Firefox is a convenience not a bug fix.
Comment 88 Peter Lairo 2010-04-19 09:34:18 PDT
(In reply to comment #87)
> it is not a bug.
> is a convenience not a bug fix.

That is why this "bug" is an "enhancement" (with 164 votes).
Comment 89 Laughing John 2010-04-26 03:13:57 PDT
165 Votes! 

I don't really care who invented it or whether it is a bug or an enhancement. All 

I know is it's something I would find very very useful and I would really like to see it integrated into FF.

The reason I don't 'need' it is because I just use Internet Explorer every time I want to save a single page as MHTML, but I'd rather not have to do that! In an ideal world all browsers would support this as a standard (drops dead laughing).
Comment 90 Calc-Yolatuh 2010-04-27 11:19:42 PDT
I use this feature frequently in Opera, because my PCs all have different OSes.
Comment 91 Tomer Cohen :tomer 2010-04-28 01:40:56 PDT
I've recently read on Planet Mozilla that Fennec will imply a "Save as PDF" feature for the next release, in order to make saving websites easy on mobile platforms. Since Firefox and Fennec share some amount of code, it might be possible to re-prioritize this issue in order to make it a better alternative for "Save as PDF", as MHTML is more open format than PDF. 

http://madhava.com/egotism/archive/005045.html - Since it is impossible to comment on this post, it would be nice if someone can contact him and notifying on this RFE.
Comment 92 Calc-Yolatuh 2010-04-28 08:58:06 PDT
Huh. Looks like Fennec won't be much of a threat for now, then. Perhaps if it saved as PDF and then emailed it, we may have a killer feature. His screenshot also exposes the lingering "unknown size" bug.

So Fennec will be able to save files as a type it can't even read? Sounds counter-intuitive. MHT is not perfect, but wider adoption will force the standard to make some improvements of its own.
Comment 93 Marco Castelluccio [:marco] 2011-08-27 18:20:34 PDT
The UnMHT extension does this work, can we integrate it into Firefox?
Comment 94 j.j. 2011-09-30 15:57:55 PDT
Provide a patch, write tests, ask for review, address review comments, let it land, done.
Comment 95 Arho Huttunen 2011-09-30 21:04:03 PDT
Before someone wastes their time I actually tried to implement this back in 2008 or 2009 and ran into unexpected problems. This task isn't as trivial as it at first seems. Let's just say that you can't just take UnMHT or Thunderbird and make it work in Firefox.
Comment 96 Andre Klapper 2012-04-03 02:06:18 PDT
*** Bug 603476 has been marked as a duplicate of this bug. ***
Comment 97 Tomer Cohen :tomer 2013-02-03 00:38:58 PST
I've found that Chromium does have MHTML support[1], although it is still marked as experimental and require manual toggling in its configuration page. Supporting MHTML would allow us to easily make desktop HTML5 portable applications, and I think it would be more useful to our users and more reflecting our mission to support the web, than, for example, building our own built in PDF viewer. 

[1] https://codereview.chromium.org/7064044/ - They also have bunch of resolved and unresolved issues on https://code.google.com/p/chromium/issues/list?can=1&q=MHTML
Comment 98 Sylvhem 2013-09-02 12:59:48 PDT
I think this is a very useful feature. When you save a webpage with a view to read it outline or later, it is more convenient to have a single file.

(In reply to Lance Baker from comment #87)
> MHTML is not an approved standard. It is a Microsoft idea that other browser
> developers have followed.
Among the authors of the RFC2557, only one works for Microsoft. Moreover, it is not like if MHTML is a closed file format: the specification is public and part of IETF's work.
Comment 99 Julian Reschke 2013-09-02 13:50:26 PDT
(In reply to Lance Baker from comment #87)
> MHTML is not an approved standard. It is a Microsoft idea that other browser
> developers have followed. Whether Firefox follows the trend or not is a
> choice. If they don't, it is not a bug. We already have Zip to archive web
> pages and related objects. Using an add-on to do the archive from within
> Firefox is a convenience not a bug fix.

It's a specification approved as "proposed standard" by the IETF. Just like many other things the internet runs on.
Comment 100 Kevin Brosnan 2014-06-22 11:38:45 PDT
*** Bug 1028603 has been marked as a duplicate of this bug. ***
Comment 101 ajf 2015-08-25 07:57:18 PDT
It's a shame that after 18 years, Mozilla still has no support for MIME HTML. If I knew C++ and the codebase, I'd write a patch, but alas.

I hope this comment might remind someone this exists and spur them into action.
Comment 102 石庭豐 (Seak, Teng-Fong) 2015-08-26 10:11:36 PDT
(In reply to ajf from comment #101)
> It's a shame that after 18 years, Mozilla still has no support for MIME
> HTML. If I knew C++ and the codebase, I'd write a patch, but alas.

There is actually an alternative solution and we don't need to know C++.  It was suggested in comment #78 and confirmed in comment #93: use the add-on called UnMHT (https://addons.mozilla.org/en-US/firefox/addon/unmht/)  I also can confirm it's working good.  I'm pretty sure it can be integrated inside Firefox setup so that it's enabled by default.  Look, Calendar project used to be an add-on for Thunderbird.  Now in TB 38, the add-on is integrated and works perfectly.  So why not UnMHT?

I've seen comment #95 saying that it does not work for him.  Maybe the commentator didn't use the right method?  We cannot put the xpi file like that inside "extension" folder.  In all cases, the file name has to be changed.  In some cases, it's also necessary to unpack the file.  For UnMHT, filename change is enough.  Here are the steps for FF 40:
1. Download unmht-8.0.0-an+sm+tb+fx.xpi from https://addons.mozilla.org/en-US/firefox/addon/unmht/
2. Change the name to {f759ca51-3a91-4dd1-ae78-9db5eee9ebf0}.xpi
3. Put it into "extension" folder.  There are two extension folders in Windows:
  a. System-wide:
     Put it in "C:\Program Files (x86)\Mozilla Firefox\browser\extensions" and whoever logs in the computer will get the add-on.
  b. User-wide:
     Put it in C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\extensions so that only <user> will get it
4. In either case, it's still necessary to explicitly enable the add-on.
Comment 103 Eyal Rozenberg 2015-08-26 13:25:13 PDT
(In reply to 石庭豐 (Seak, Teng-Fong) from comment #102)
Teng-Fong, I believe you're mistaken. The core issue with MIME support is that it's based on code which is essentially a custom object system implemented in C, with polymorphic construction by class name, and other strangeness. It is very tricky to work with, and what's _really_ necessary is getting rid of it in favor of a proper C++'ish MIME library. Problem is, it's like a house of cards which collapses on top of you when you do that. Last decade I had tried to initiate this kind of a rewrite, but it didn't work out. See also Arho's comment #95.

Anyway, something like UnMHT are not really a solution, it's a workaround; and it would not be reasonable to integrate it. It would be yet another layer over the problematic core.
Comment 104 Eyal Rozenberg 2015-08-26 13:25:29 PDT
(In reply to 石庭豐 (Seak, Teng-Fong) from comment #102)
Teng-Fong, I believe you're mistaken. The core issue with MIME support is that it's based on code which is essentially a custom object system implemented in C, with polymorphic construction by class name, and other strangeness. It is very tricky to work with, and what's _really_ necessary is getting rid of it in favor of a proper C++'ish MIME library. Problem is, it's like a house of cards which collapses on top of you when you do that. Last decade I had tried to initiate this kind of a rewrite, but it didn't work out. See also Arho's comment #95.

Anyway, something like UnMHT are not really a solution, it's a workaround; and it would not be reasonable to integrate it. It would be yet another layer over the problematic core.
Comment 105 Mardeg 2015-12-10 11:33:35 PST
Patrick, could you please provide a link to the source of, or just state/quote the reasoning behind,  the decision to resolve this as WONTFIX?
Comment 106 Patrick McManus [:mcmanus] 2015-12-10 18:08:33 PST
This isn't on anyone's roadmap and nobody has provided a patch for it in 15 years - so its just clogging up bugzilla. That doesn't mean it isn't a good idea - it just means nobody is planning on working on it. If someone works on it then this should be opened as a new issue.
Comment 107 ajf 2015-12-11 16:33:28 PST
But marking it as WONTFIX means that there's been a conscious decision made not to implement it, right? Here it's just a case that nobody's done it. It might be done someday.
Comment 108 Ondra Zizka 2015-12-11 17:23:53 PST
How will someone looking for things to work on find this request?

Note You need to log in before you can comment on or make changes to this bug.