How do I host an mhtml file on a webserver? - html

I want to just be able to get people to go a link to an mhtml file hosted on a server and be able to see the fully formatted webpage that you'll see when you save the file and open it in Google Chrome (Apparently IE works as well, Firefox and Microsoft Edge do not work). How do I go about doing that?

Might as well post this as an answer for whomever else gets this problem.
Upon renaming the mhtml file to an mht file, and Extractmht can be used to convert the file to an html file, which can then be hosted.
[2022 Edit]:
Alternatively, open the mhtml file in Chrome/Firefox and use an extension like Singlefile to download it as a proper html page.

Related

Save excel file containing links as html, and these links open in file explorer, not web browser

I have an excel sheet with links to local folders. To make it more device "friendly" I save it as html. All is fine, but the links open on the web browser, not windows file explorer.
I know that html does not open aps, but I do not know if opening a local folder with windows file explorer is considered an app, or I miss something.
Excel: =hyperlink("c:\testfolder")
Of course another suggestion on the matter is welcome...
add file:// to the link
=hyperlink("file://c:\testfolder")

is it possible to make an hyperlink to only download a pdf file?

I have an hyperlink to a pdf form that can not be opened by the browser's pdf viewer. If clicked, the browser tries to show it but I get the error message like "it is necessary Acrobat Reader 8.x" etc. Is there a way to force an hyperlink to such pdf form file to only allow its downloading? In this way, the user could open it with his local Adobe Reader.
Let’s say you have a PDF that you want to let people download. The file will be like this:
Download Receipt
In most browsers, clicking on the link will open the file directly in the browser.
But, if you add the download attribute to the link, it will tell the browser to download the file instead.
<a href="/path/to/your/receipt.pdf" download>Download Receipt</a>
The download attribute works in all modern browsers, including MS Edge, but not Internet Explorer.
In the latest versions of Chrome, you cannot download cross-origin files (they have to be hosted on the same domain).
To make the hyperlink to download the pdf file when clicked, you should use download property inside the anchor tag. For example you can see the code below:
Download the pdf file
You can also give your own name to the downloadable pdf file in the download property that I provided as 'Document' in the code above.
Yes, it is possible. First download the file and then you'll see a link when it downloaded(it disappears quite quickly) just copy it and use:
hyperlink

Embedded PDF Issue in Edge Browser

When using the Microsoft Edge browser, by default when you open a PDF it will open the PDF in a new tab using the built-in PDF viewer. To avoid this, you can adjust the browser's settings: Toggle on the "Always open PDF files externally" option. This works great. However, it presents a separate issue. Our internal applications use embedded PDFs in iframes. When the external toggle is set to on, these PDFs will not show in the iframes. This doesn't happen in Chrome. Has anyone else experienced this and know a work around?
I've tried removing the type="application/pdf" from the iframe tag to no avail. I can't find anything else online.
It looks like an expected result because you have enabled the option Always open PDF files externally.
So MS Edge browser is giving you an option to download the PDF file and open it using the desired app.
You said this doesn't happen in Chrome browser.
If you enabled the Download PDF files instead of automatically opening them in Chrome option then you will notice the same result in the Chrome browser.
Output in the Chrome browser:
If you click on the Open button then it will download the PDF file.
I did not get any solution or a workaround for this issue.
If you think that there should be an option to load the file in an iframe if Always open PDF files externally option is enabled then I suggest you click on the Send Feedback button in the MS Edge browser and try to provide your feedback about it to the Microsoft.
I posted feedback suggesting that an exclusion/inclusion list be in included but the simplest way would be to treat the frame as part of the session. But this is not Microsoft it is the Chrome projects issue.

Chrome automatically download local file

I want to view the markdown file in my Chrome browser; however when I open the local markdown file it download the file in my local directory. However, I tried with TXT file and browser address location looks - file:///C:/ that works fine though. The same approach like TXT file does not work for markdown file.
Any suggestion will be greatly appreciate. Thank you !
Chrome will not support the all content type it will support only some specified content type. If you want to show the file into your browser you need to set the headers.
Here is the GITHUB Block how they show all files
https://github.com/blog/1482-heads-up-nosniff-header-support-coming-to-chrome-and-firefox

how to show open/save dialog when linking to pdf files

I'm trying to link a pdf document from a static html file.
What I'm using is:
My pdf File
the open/save dialog comes up in firefox but not in IE7 or IE8.
I believe I have to change the MIME type but I don't know where to change it...
Since it works in Firefox I assume the file is actually there and accessible. In that case it depends on the browser settings how the download is handled. It might be that the download happens in the background because you setup that it should automatically download everything into a predefined folder (e.g. My Downloads/).
Check the IE settings to see where it puts downloads and check the folder to see if downloaded the file.