Fed up with browser wars? MSIE v Netscape, AOL LOL, MSIE v Firefox, MSIE v Opera? Who needs a browser? Peace.
You can easily turn a site into an HTA online or offline.
TIG has probably one of the most developed HTA implementations anywhere — due in large part to a notable absence from the Internet of HTA, I HTA (hasten to add) humbly.
How does an HTA browser object work?
You open HTML pages like in a browser. The pages display within an application window. Not just any application window — a HyperText Application (HTA) window.
HTA is like a browser. It allows you to access files on the World Wide Web and other networks. The only difference is that you won’t find buttons. Back and Forward. You might have reached this page looking for an easy method to create HTAs with navigation buttons. You’ve come to the right place. Look no further than at the script sections in the sample code or download the example (11 KB).
What are the requirements?
Cache Method: “Run” (or open — do not save, then run) index.hta (5.7 KB). (Click on the link.) Your browser caches the file and runs it from the cache. Some browsers only permit you to save the file.
Save Method: Download htas.zip (10 KB). (Click on the link.) The ZIP archive contains four HTAs, a MIDI jukebox (1), an MP3 song (2), a JAVA applet (3) and TIG (4). The MIDI jukebox, the MP3 song and the JAVA applet open (in application windows) when you click on them or open from TIG that has button links.
tssp3.hta (3) and
index.hta (4), keeping the files together after extracting them in the same folder. Double-click
index.hta to open TIG.
Why don’t more people have HTA sites?
HTA is a means of distributing HTML. That does not endear it to many who mistrust deployable code. Malicious HTAs are coming to get you.
What can you do to protect yourself against naughty HTAs?
Don’t click on files with that extension. Data Execution Prevention (DEP) on Vista and above might protect you by stopping legacy ActiveX controls from doing mischief inside HTAs.
Can you get an upgrade for the HTA rendering engine?
Clicking an HTA executes mshta.exe which instantiates the Internet Explorer rendering engine (mshtml). The newer your Internet Explorer browser, the newer your rendering engine. By default mshta.exe runs in compatibility view, which displays doctype strict pages in IE7 standards mode and doctype transitional pages in IE5 (quirks) mode. It is however possible to modify (slightly) the default by adding a DWORD (32-bit) value to the Windows registry. The value you set defines IE9 compatibility view. On Windows 10 (with Internet Explorer 11) this is now unnecessary.
Wow6432Node (64 bits)
mshta.exe = (DWORD) 2710
mshta.exe = (DWORD) 2af8
For more information about these settings and possible values read this MSDN article:
When you set the document compatibility to IE9 mode, you are able to switch it on. In HTA files include a meta tag in the HTML head section, near the top.
<meta http-equiv="x-ua-compatible" content="ie=9">
In your HTML pages consider specifying the highest standards mode available, content="IE=edge". It will ensure IE9 functionality is enabled for those pages on newer platforms. If using frames or iframes, placing the meta directive in the parent frame should be enough.
HTML is not DPI-aware.
You will need to manually scale all of your content for HiDPI displays with CSS (too much work?), or by zooming in. Hit [Ctrl][+] keys until the size is right.
../hta/index.hta (5.7 KB — TIG)
../hta/midiload.hta* (3.6 KB — Jukebox)
../hta/htas.zip (10 KB)
* I am particularly partial to MIDI.