Tips & Tricks, Tutorials, Hacking, Troubleshooting,

So there’s one really annoying thing about the way Internet Explorer works and that’s when you try to save a web page. If you click on Save As, by default IE will choose the Webpage, complete (*.htm, *.html) format when saving.
save webpage ie
I don’t like this format when saving web pages because it creates one HTML file for the source code and then saves all the other assets like JS files, images, CSS, etc in a separate folder.
ie save webpage
Instead, I always change it to Web Archive, single file (*.mht). This is a lot more convenient for me if I am just looking for a quick way to save a few web pages and don’t care about all the source files.
web archive mht
So is there any way to default IE so that it saves every webpage in the MHT format instead of HTML? Well, not exactly. You can’t reconfigure the File – Save As or pressing CTRL + S on your keyboard. That will still bring up the Save Webpage dialog with Webpage, complete as default.
However, you can create a new button on the Favorites toolbar that, when clicked, will bring up the save Save Webpage dialog, but with MHT as the default. It’s the best solution and really the only one out there. It works nicely because it doesn’t require any additional clicks to use either.
Also, if you know how to use a program like AutoHotKey, you can create a keyboard shortcut so that you can press just one key to run the script and have the Save Webpage dialog pop up! In this article, I’ll show you how to do this.
First, you need to created a VBS script with the following code. In order to do this, open Notepad and paste in the following code:
WScript.Timeout=10
Set wShell=CreateObject("WScript.Shell")
wShell.SendKeys "^s"
Do While Not wShell.AppActivate("Save Webpage")
WScript.Sleep 100
Loop
wShell.SendKeys "%t{home}tww%n"
It should look exactly like this:
save webpage
Next, click on File – Save and then change the Save as type to All Files. Give the file a name like SaveAsMHT.vbs. The important thing is the .VBS at the end of the file name.
save as type
Save the file somewhere on your computer, doesn’t really matter where. Next, right-click in the same folder and choose NewShortcut.
new shortcut
Go ahead and click Browse and then select the VBS script. Give your shortcut a useful understandable name like Save As or Save As MHT, etc.
new shortcut vbs
shortcut name
Now for the last step. Open Internet Explorer, right-click anywhere in the top title bar and select Favorites bar.
favorites bar
Now all you have to do is drag and drop the shortcut to the Favorites bar. You may have to minimize IE so it’s not taking up the whole screen in order to do this.
shortcut favorites bar
That’s it! Now just click on that button, which will run the script and open the Save Webpage dialog set to the MHT format automatically.
mht save as
Sweet! So for those of you who save a lot of webpages, hopefully this will make your life easier by creating a shortcut to saving web pages in MHT format. Enjoy!

No comments:

Post a Comment