HTA

Browser Object

Fed up with browser wars? MSIE v Netscape, AOL LOL, MSIE v Firefox, MSIE v Opera? No more browser wars. Who needs a browser? Peace.

You can easily turn a Website into an HTA that works online or offline.

TIG probably has one of the most sophisticated 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?

Instead of opening a Web page online in your browser, you open the page locally. The page displays within an application window. Not just any application window, that is: a HyperText Application (HTA) window.

If you’re interested in creating HTAs with browser navigation buttons, have a look at the script sections in the sample code or download the example (10 KB).

What are the requirements?

Starting TIG in an HTA window requires Microsoft Windows and Internet Explorer 5.5. You can run the browser object in two ways. To test-drive my HTA (from this site), do this —

Cache Method: “Run” (or open — do not save, then run) index.hta. (Click on the link.) The browser caches index.hta before it launches. The file is 5.2 KB. Some browsers only permit you to save the file.

Save Method: Download htas.zip (6 KB). (Click on the link.) The ZIP archive contains three HTAs, a MIDI jukebox (1), an MP3 song (2) and TIG (3). The MIDI jukebox and the MP3 song are linked in TIG. You can open them as links. The HTAs launch application windows. Extract midiload.hta (1), tchaser.hta (2) and index.hta (3). Keep the files together, extracting them to the same place. Double-click index.hta to open TIG in HTA mode.

Why don’t more people have HTA sites?

HTA is unfashionable. The strength of HTA is that it is deployable — as an HTML interface, as a means of distributing offline pages. That does not endear it to many who mistrust the practice of deploying code. Malicious HTAs are coming to get you.

What can you do to protect yourself against naughty HTAs?

Don’t click on files with an .hta extension. Data Execution Prevention (DEP) on Vista might protect you by stopping legacy ActiveX controls from running inside HTAs.