Running AJAX as a HTML Application (HTA)
Ever thought about using Microsoft’s HTML Application (HTA) technology? If you are developing AJAX applications for internal customers and have standardized on Internet Explorer, then I would highly recommend this route.
Basically, a HTA only uses the Internet Explorer rendering engine, so you don’t get any of the browser add-ons such as the toolbar, status bar, and address bar. The back button is not available. You get a blank canvas on which to work.
The other benefits include:
- Complete access to local machine
- Smaller memory footprint
- A bit quicker than using the browser
- No back button
- No context menu
Disadvantages:
- Only runs on Windows machines
- Uses IE rendering engine
- User is prompted to RUN the application (because of security)
One of the less obvious benefits is that a HTA pretty much eliminates some of the closure memory leak problems with IE. Basically, whenever you destroy DOM elements (and leave/refresh a page), expando properties that reference JavaScript objects are not cleaned up. This in turn means that memory allocated to the DOM element is not freed.
When you close a HTA (there is no concept of refreshing the page other than F5), you destroy the entire process – hence the memory leaks are not an issue. If you create and destroy DOM elements within the application however, then you will still have to handle these appropriately.
Anyone else play with HTAs?
Comments
Comment from udayms
Time: January 12, 2007, 3:49 am
I have used dhtml/javascript with HTA back in 2002 to build prototypes. I found that it was extremely useful. Then again, the dependancy on Windows is a real catch. I guess Apollo would answer all these problems. ![]()
Comment from Darryl Lyons
Time: January 12, 2007, 6:27 am
Yeah Apollo may answer those problems. I still have a question over the rendering engine they are using - but all said and done, can’t make any judgments until the beta.
Comment from Dan G. Switzer, II
Time: January 12, 2007, 12:21 am
I’ve used HTAs a lot for personal usage. It’s a quick way to build a little standalone application. If there’s a streaming web-based audio service I use a lot, I’ll usually wrap up an HTA shell to the player. Having it run as a standalone executable offers a couple of nice benefits.