Monday, March 20th, 2006

MS HTML Applications

Category: JavaScript, Programming

Speaking of Web-Desktop Integration, Russell Beattie has rediscovered an old Microsoft feature, HTML Applications, that lets you create little windows apps with Javascript.

I ran across a bunch of stuff I remember messing with back in 1999 – including HTML Applications contained in an .hta file. Ahh, that’s right – that’s how you can make apps using the scripting stuff. By using an .hta file, you’re essentially making an html page which runs without a sandbox, and can call local COM objects and such.

He’s noticed that HTML Applications are a form of Single Page Application (SPA). and has taken a few web apps and converted them to HTA: TiddlyWiki HTA (the original TiddlyWiki itself is a SPA, but not using HTA), Grazr HTA, and Yahoo! Mobile HTA (all are Windows-only and beware they have more permissions than your average web app!) Each of these can now sit in their own Windows taskbar, “kinda like a widget”.

There are, however, limitations, beyond the obvious problem that you have to be running Windows:

I quickly discovered that trying to use the XMLHTTPRequest object with a dynamic URL prompts the user every time, which is defnitely annoying. And, hey, if you didn’t know, I also discovered that Microsoft has a patent on the HTML Desktop app already. Isn’t that nice?

Here’s a nice introduction to HTA by Hyperwrite.

Posted by Michael Mahemoff at 3:54 am

3.3 rating from 12 votes


Comments feed TrackBack URI

This is actually old news.
I noticed the HTA on Office 2003 Beta’s CD two years ago, and found it interesting.

Comment by kourge — March 20, 2006

I use quite a lot of HTAs.

Comment by Joe Anderson — March 21, 2006

Um…I use HTA’s all the time. I have one that monitors my clipboard every 100ms or so. If I copy a URL that is over 80 characters it uses XMLHTTP to go to my server, add the URL to a DB and get a much shorter URL (21-22 chars total) and copies it back to my clipboard. This happens in a fraction of a second, so I just copy a URL then paste it and voila, a short URL. If I copy the same URL twice the feature is disabled.

I don’t get any alerts…so I’m not sure why it says you get an alert every time…

Comment by CWolves — March 21, 2006

Here’s the prior art cited on Microsoft’s patent:

These days Zeepe offers an ultra set of HTA functionality.

Comment by Jerry Mead — March 22, 2006

Anybody who uses a windows OS uses HTAs. Add / Remove Programs would be the most common example, but they’re used all throughout windows. Don’t be suprised MS has a patent, they only run in IE on windows. If you do some researching on MSDN about IE on windows DHTML capabilities, you’ll notice that IE can do pretty much everything explorer.exe can do. And it’s been like this since at least IE5.0.

If you interested in HTAs, have a look at this.

Comment by bigusfickes — March 24, 2006

looks like you posted a day early:

Comment by BillyG — March 24, 2006

could someone tell me where i can find the code, or maybe provide some snippets of code that will allow me to create a self-updating SPA. I keep trying to find it on the net and it’s just confusing.
I’m trying to write a HTML application for studying chinese characters (flashcard program with integrated card editor).
any help would be….. helpful :P

Comment by Kevin — November 6, 2007

Leave a comment

You must be logged in to post a comment.