# Web Developing using .mht files



## dswolfgang (Jan 5, 2005)

Hello Friends,
I am a new web designer. I have learned how to use the Macromedia Studio, But instead I took the easy way out ( I developed 3 sites using a program on my computer, Microsoft Home Publishing ). I had two choices to save the sites in choice one was save as ( Microsoft Home Publishing, .mhp ) or ( Microsoft Home Publishing MHTML, .mht ) I chose the latter thinking that I was choosing the files to be saved as .html or .htm files. 
Finally, long story short, can a web host recieve my .mht uploads as one file, and can I use all of my hard work? Note: the files are read fine offline in for example IE on most all computers. Furthermore, when I view the source the source reads .....HTML Public.....HTML etc.
HELP! I just want to know if the .mht is the same as .html or what I must do I not have a problem here.
Thanks for your responses.
Best regards,
Demetreous


----------



## Shadow2531 (Apr 30, 2001)

An mht file is like an html email with attachments. The mht format is used for archiving a web page. It's not great for serving a web page.

MHT is not what you want.

You want to upload each page as an .html file and upload any pictures/files etc. that the web page uses.

If all you have are mht files, you can look for a program to extract everything from each mht file or view the mht file in IE and then save with images to get the individual files back.

Saving as MHT changes the code of the web page a little.


----------



## dswolfgang (Jan 5, 2005)

So if I understand you correctly, I can take my website that is stored on my Zip disc in .mht and view and save the file as an .html file while I am in my browser? AND / OR find a file extracter to change the .mht files to .html files?
Do you have a suggestion on what program does that?
Plus, please accept my deepest appreciation for your help, for this forum and YOU have been the greatest help to me through all of my research to date.
Can't wait to hear from you.
Ciao,
Demetreous


----------



## Shadow2531 (Apr 30, 2001)

If you have an entire website embedded into one mht file, you'd want to view each page of the site in IE and save as "web page complete".

However, any external files (like images) won't load in other browsers besides IE unless you makes some changes to the source of each generated html page and change the extension of each of the generated temp files. (external files are generated as .tmp files when saving from an mht file).

How many pages do you have for the site? Are they really all embedded in 1 mht file?


----------



## Shadow2531 (Apr 30, 2001)

I forgot to mention:

Load the mht file in the program that saved it and then tell the program to save as regular files.


----------



## dswolfgang (Jan 5, 2005)

Hey Shadow,
You are like a gaurdian angel. I have this site, and have asked so many people and called so many people (i.e. web hosts ) and you seem to be the most clear and knowledgable. THANK YOU. 
I guess I lied when I said the last question would be it. Well here goes,
When you said the following:
*However, any external files (like images) won't load in other browsers 
besides IE unless you makes some changes to the source of each 
generated html page and change the extension of each of the generated temp 
files. DID YOU MEAN GO IN AND RESAVE THE IMAGES AS .JPEGS etc.? AND CHANGE ( AS PER OUR LAST EMAIL ) CHANGE THE PAGES OF MY WEBSITE TO .HTML FILES VIA SAVING THEM AS WEB PAGES IN THE BROWSER?
F U R T H E R M O R E:
How many pages do you have for the site? ANSWER: 3 SITES ( WITH 4 PAGES FOR EACH SITE I.E. HOME, ABOUT US, PRODUCTS, CONTACT - INCLUDING LINKS TO OTHER SITES CONTAINED WITHIN ) Are they really all embedded 
in 1 mht file? ANSWER : I BELIEVE SO, YES. BECAUSE ALL I HAVE BEEN DOING TO VIEW THE SITES IN THE BROWSER- OFFLINE- IS POPPING IN MY ZIP DISK WHEN I AM NOT LOCAL OR VIEW THROUGH BROWSWER FROM THE HARD DRIVE.*

Wow, Now I can't wait until you reply to this one, because I believe because of you SHADOW My hope of getting these .MHT sites up and hosted sounds promising.


----------



## Shadow2531 (Apr 30, 2001)

To clarify on the external file part, I'll show you what I mean by example:

goto www.google.com in Internet Explorer.
file
save as
set "save as type" to "web archive mht"
click "save" to save it to your desktop.

On your desktop will be google.mht.

Open google.mht in internet explorer.
file
save as
set "save as type" to "web page complete"
click "save" to save it to your desktop.

You should now have google.htm and the Google_files folder on your desktop.

In the Google_files folder will be a .tmp. (It's actually the google logo gif file).

Now if you view google.htm in Internet Explorer, it will recognize the pic even though it has a .tmp extension and show it. However, other browsers will only load the pic if you are lucky because it doesn't have the right extension.

To fix that, you need to change the .tmp file to have the right extension. In this case, it's .gif.

Then in google.htm is an img tag whose source points to the temp file you just renamed. The src attribute contains an absolute URI to the file. You need to change it to a relative URI and of course change the extension in the URI to .gif to match the .tmp file you just renamed.

src="Google_files\mht26EE.gif"

Then it will work in other browsers too. mht26EE is an ugly name, so you'd probably want to rename the file to something that makes more sense and of course change the src attribute to match.

*That's the type of thing you'd have to do for each one of your pages to manually recreate your pages*

However, none of that should be necessary. If the program can save to mht, it should be able to open mht files and allow you to save normally

If none of that helps and the mht file is not that large, you could send us the mht file and we could possible convert it for you, but again, the program you used should be able to do that for you.

If you pm, I'll give you my email address.


----------



## dswolfgang (Jan 5, 2005)

Hello Shadow,
Thanks so much. I actually was able to click and save each page as a complete .htm, but when I went to view each page, only the index page would work and the other rename complete pages were like placebos ( i.e. the 2nd page saved as "about us".htm was not opening up ) On the other hand the Index/home.htm (convert) was running all the links properly etc. Does mean that all I need to do is upload that one page, plus the folders? hmmmm
Also I did the google practice as you instructed, but I must try the .tmp conversions now again, because its starting to become confusing. I will try again to understand your instructions with regards to those conversions (.tmp to .gif etc.)
Please let me know about the above response regarding me simply uploading to the host the Index.htm conversion, would this be sufficient?
THANKS SUPER SHADOW,
Demetreous


----------



## Shadow2531 (Apr 30, 2001)

You need to get it to work on your hard drive first before you upload it. If not, it most likely won't work when you upload.

Crud, on it not working for every page.

Check your links, in the source of each page. A lot of them are probably absolute URIs starting with c:\........ . You need to change all those to relative URIs. The google example shows how to do that.

Another way you can do, instead of of "save as webpage complete", is to view each page, view the source in notepad, save the source as an html file, right-click and save each picture. Then edit the source of each page to make sure anything that points to an external file is pointing to the right file.


----------



## dswolfgang (Jan 5, 2005)

You must be a consultant or a professional or both!
I am surprising myself, because I understand 99 percent of your notes because I actually paid attention in school, ( which is why I should have just created everything in macromedia ).
So, I did you what you said and notepaded to the actual html and changed all of the .tmp to .gif, after I changed all of the .tmp files in the folders but, maybe you didnt say to do that?=)
I then opened the pages in the browsers again and they looked worse and unorganized. Good thing I have everything saved. 
At this point I will try to see if the web hosts will take what I have with regards to uploading a successful home.htm ( converted from .mht ) along with all of the other file conversions ( which are full .tmp folders ) but empty .mht pages i.e. aboutus.htm, for the only page that comes up when I open the aboutus.htm is the same index/home.htm page and the same goes for when I open the contact.htm ( conversion fr. .mht ) etc.
Finally, I will go in and try to save as you stated in this current email and see what happens.
YOURE AWESOME SHADOW, HAVE A GREAT DAY
DEMETREOUS


----------

