Hi all
I have an HTML document in, say, C:\Temp. It contains, amongst other things, the following:
<link rel="stylesheet" type="text/css" href="./tech1117.css"> and <img width="575" height="467" src="./Domain00.jpg">
This file displays correctly and I save it as an MHTML (Web Page, Single file). When I open the MHTML the styles from the stylesheet are not showing and nor is the image, even though the MHTML, stylesheet and image file are all in the same folder.
I have tried this (saving as MHTML and opening MHTML) using Chrome, Firefox, Edge and Opera. Inspecting the MHTML shows
<link rel=3D"stylesheet" type=3D"text/css" href=3D"file:///C:=/Temp/tech1117.css"> and <img width=3D"575" height=3D"467" src=3D"file:///C:/Temp/Domain00.jpg">
Am I missing something here? I thought that the MHTML could be opened from anywhere and should display correctly even if the stylesheet and image files are absent (because they should be embedded in the MHTML).
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Paul:
How are you saving the page as MHTML? Are you doing that in a browser, or using Automation or something else?
If a browser, which one?
On Fri, May 27, 2022 at 12:54 PM Paul Newton paul.newton.hudl@gmail.com wrote:
Hi all
I have an HTML document in, say, C:\Temp. It contains, amongst other things, the following:
<link rel="stylesheet" type="text/css" href="./tech1117.css"> and <img width="575" height="467" src="./Domain00.jpg">
This file displays correctly and I save it as an MHTML (Web Page, Single file). When I open the MHTML the styles from the stylesheet are not showing and nor is the image, even though the MHTML, stylesheet and image file are all in the same folder.
I have tried this (saving as MHTML and opening MHTML) using Chrome, Firefox, Edge and Opera. Inspecting the MHTML shows
<link rel=3D"stylesheet" type=3D"text/css" href=3D"file:///C:=/Temp/tech1117.css"> and <img width=3D"575" height=3D"467" src=3D"file:///C:/Temp/Domain00.jpg">
Am I missing something here? I thought that the MHTML could be opened from anywhere and should display correctly even if the stylesheet and image files are absent (because they should be embedded in the MHTML).
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks Ted
I am saving as MHTML from the browser(s) ...
Paul
On 27/05/2022 19:34, Ted Roche wrote:
Paul:
How are you saving the page as MHTML? Are you doing that in a browser, or using Automation or something else?
If a browser, which one?
On Fri, May 27, 2022 at 12:54 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi all
I have an HTML document in, say, C:\Temp. It contains, amongst other things, the following:
<link rel="stylesheet" type="text/css" href="./tech1117.css"> and <img width="575" height="467" src="./Domain00.jpg">
This file displays correctly and I save it as an MHTML (Web Page, Single file). When I open the MHTML the styles from the stylesheet are not showing and nor is the image, even though the MHTML, stylesheet and image file are all in the same folder.
I have tried this (saving as MHTML and opening MHTML) using Chrome, Firefox, Edge and Opera. Inspecting the MHTML shows
<link rel=3D"stylesheet" type=3D"text/css" href=3D"file:///C:=/Temp/tech1117.css"> and <img width=3D"575" height=3D"467" src=3D"file:///C:/Temp/Domain00.jpg">
Am I missing something here? I thought that the MHTML could be opened from anywhere and should display correctly even if the stylesheet and image files are absent (because they should be embedded in the MHTML).
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Hi Ted
I finally remembered ... I checked out some other MHTML files that I had worked with previously. It turns out that none of the browsers displays MHTML correctly BUT if I use the IE Tab extension in the browser they show correctly - and they display correctly in IE as well. I don't know if there is any other workaround for Chrome, Firefox etc.
Thanks again
Paul
On 27/05/2022 19:34, Ted Roche wrote:
Paul:
How are you saving the page as MHTML? Are you doing that in a browser, or using Automation or something else?
If a browser, which one?
On Fri, May 27, 2022 at 12:54 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi all
I have an HTML document in, say, C:\Temp. It contains, amongst other things, the following:
<link rel="stylesheet" type="text/css" href="./tech1117.css"> and <img width="575" height="467" src="./Domain00.jpg">
This file displays correctly and I save it as an MHTML (Web Page, Single file). When I open the MHTML the styles from the stylesheet are not showing and nor is the image, even though the MHTML, stylesheet and image file are all in the same folder.
I have tried this (saving as MHTML and opening MHTML) using Chrome, Firefox, Edge and Opera. Inspecting the MHTML shows
<link rel=3D"stylesheet" type=3D"text/css" href=3D"file:///C:=/Temp/tech1117.css"> and <img width=3D"575" height=3D"467" src=3D"file:///C:/Temp/Domain00.jpg">
Am I missing something here? I thought that the MHTML could be opened from anywhere and should display correctly even if the stylesheet and image files are absent (because they should be embedded in the MHTML).
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
MHTML is not usually supported as a brower format. It's an output format: combining HTML, CSS, JS, and images into a MIME-compliant (sorto) single file archive format. There are some readers, and converters to put files into more common document formats. A dated Wiki article lists some: https://en.wikipedia.org/wiki/MHTML#Browser_support I just created an MHTML file in GNOME Web, read it in a text file reader, and failed to get it to display again in GNOME Web. The file starts:
From: <Saved by WebKit> Subject: TR&A Home Page Date: Sat, 27 May 2022 17:17:51 -0400 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_97B1_0143DBAC.3B903B8E"
------=_NextPart_000_97B1_0143DBAC.3B903B8E Content-Type: text/html Content-Transfer-Encoding: quoted-printable Content-Location: https://www.tedroche.com/
In my experience, some browsers can create an MHTML file, but few can read it. An email (.eml) file reader can, though.
What is it you are trying to accomplish?
Note, too, that the format has several known exploits: https://en.wikipedia.org/wiki/MHTML#Exploits
On Fri, May 27, 2022 at 4:23 PM Paul Newton paul.newton.hudl@gmail.com wrote:
Hi Ted
I finally remembered ... I checked out some other MHTML files that I had worked with previously. It turns out that none of the browsers displays MHTML correctly BUT if I use the IE Tab extension in the browser they show correctly - and they display correctly in IE as well. I don't know if there is any other workaround for Chrome, Firefox etc.
Thanks again
Paul
On 27/05/2022 19:34, Ted Roche wrote:
Paul:
How are you saving the page as MHTML? Are you doing that in a browser, or using Automation or something else?
If a browser, which one?
On Fri, May 27, 2022 at 12:54 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi all
I have an HTML document in, say, C:\Temp. It contains, amongst other things, the following:
<link rel="stylesheet" type="text/css" href="./tech1117.css"> and <img width="575" height="467" src="./Domain00.jpg">
This file displays correctly and I save it as an MHTML (Web Page, Single file). When I open the MHTML the styles from the stylesheet are not showing and nor is the image, even though the MHTML, stylesheet and image file are all in the same folder.
I have tried this (saving as MHTML and opening MHTML) using Chrome, Firefox, Edge and Opera. Inspecting the MHTML shows
<link rel=3D"stylesheet" type=3D"text/css" href=3D"file:///C:=/Temp/tech1117.css"> and <img width=3D"575" height=3D"467" src=3D"file:///C:/Temp/Domain00.jpg">
Am I missing something here? I thought that the MHTML could be opened from anywhere and should display correctly even if the stylesheet and image files are absent (because they should be embedded in the MHTML).
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Thanks again Ted. I have edited your reply and added my comments:
On 27/05/2022 22:29, Ted Roche wrote:
In my experience, some browsers can create an MHTML file, but few can read it. An email (.eml) file reader can, though.
This is exactly what I have found ...
What is it you are trying to accomplish?
I frequently want to save a web page for offline use at a later time and prefer not to have the saved HTML and an associated (_files) subfolder containing images, stylesheets etc. I suppose I could print the web page to a PDF but that would be too easy <g>
Paul
Note, too, that the format has several known exploits: https://en.wikipedia.org/wiki/MHTML#Exploits
Thanks for the heads-up, best rfegards
Paul
On Fri, May 27, 2022 at 4:23 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi Ted
I finally remembered ... I checked out some other MHTML files that I had worked with previously. It turns out that none of the browsers displays MHTML correctly BUT if I use the IE Tab extension in the browser they show correctly - and they display correctly in IE as well. I don't know if there is any other workaround for Chrome, Firefox etc.
Thanks again
Paul
On 27/05/2022 19:34, Ted Roche wrote:
Paul:
How are you saving the page as MHTML? Are you doing that in a browser, or using Automation or something else?
If a browser, which one?
On Fri, May 27, 2022 at 12:54 PM Paul Newtonpaul.newton.hudl@gmail.com wrote:
Hi all
I have an HTML document in, say, C:\Temp. It contains, amongst other things, the following:
<link rel="stylesheet" type="text/css" href="./tech1117.css"> and <img width="575" height="467" src="./Domain00.jpg">
This file displays correctly and I save it as an MHTML (Web Page, Single file). When I open the MHTML the styles from the stylesheet are not showing and nor is the image, even though the MHTML, stylesheet and image file are all in the same folder.
I have tried this (saving as MHTML and opening MHTML) using Chrome, Firefox, Edge and Opera. Inspecting the MHTML shows
<link rel=3D"stylesheet" type=3D"text/css" href=3D"file:///C:=/Temp/tech1117.css"> and <img width=3D"575" height=3D"467" src=3D"file:///C:/Temp/Domain00.jpg">
Am I missing something here? I thought that the MHTML could be opened from anywhere and should display correctly even if the stylesheet and image files are absent (because they should be embedded in the MHTML).
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Paul
You could try a browser extension like
https://chrome.google.com/webstore/detail/singlefile/mpiodijhokgodhhofbcjdec...
Hi Alan
Great suggestion - this extension can be added to Edge, Chrome, Opera and Firefox and moreover the saved HTML can be opened and display correctly with ANY of those browsers. Brilliant! Many thanks.
Paul
On 28/05/2022 10:18, Alan Bourke wrote:
Paul
You could try a browser extension like
https://chrome.google.com/webstore/detail/singlefile/mpiodijhokgodhhofbcjdec...
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---