I want to convert a webpage html5/js page to a desktop application. Something they can use on their desktop without a live internet connection. (I do not want to recode my html5 or js.)
If the end user has Internet Explorer installed, I can easily port this to an hta file. However, what if they are using Vista or above and have uninstalled Internet Explorer (as you are permitted to do)? What if their main browser is Firefox or Chrome?
I was searching around for Firefox, and it seemed Prism was an alternative to hta files, but if you go to Mozilla's Prism page it says it is a technology that is no longer being pursued.
So I have several questions:
- Is the hta file still a modern technology for Internet Explorer which is still going to work in IE9, IE10?
- Will hta files, with no security issues or local access issues, automatically fire up Firefox/Chrome if IE is not installed on Windows (or other operating systems)?
- Can I add some of html5's local storage stuff to my hta file and will it still work on IE, FF and Chrome?
- If these things will not work on FF or Chrome, do they have any alternatives which are modern and are not deprecated techs?
I'd say that .hta applications are way out of date since they don't support modern design standards. you can still use them or use another HTML Compilers like the one by David Esperalta, it's good enough for very simple apps, but they all depend on IE and we all know how limited and slow it is.
Modern Alternatives:
- NW.js (previously known as node-webkit)
- electron which I personally use and recommend.
both mentioned options are based on Chromium (same as Chrome), Node.js and V8. they support HTML5, CSS3 and latest JavaScript engine including latest ECMAScript features and beyond!
and since they use node.js you can use any of its built-in libraries (like FileSystem) or any of npm packages right in your DOM!
The npm registry hosts over a quarter million packages of reusable code — the largest code registry in the world.
both options are FREE and open sourced but electron supports ffmpeg codecs without downloading or building them.
your app will be 100% standalone and you can build same app for Windows, macOS and Linux.
electron can also provide simple solutions to automatically compile and use CoffeeScript, Babel, LESS, SASS and more.
Actually HTAs are not run by Internet Explorer. They are run by mshta.exe, which is installed in Windows/System32 (Windows7). However, HTAs use IE's rendering engine, and can't be run without IE. Also they are available for Windows users only.
HTML5 support can be added by using <meta http-equiv="x-ua-compatible" content="ie=9">
. By my own experience also <!DOCTYPE html>
is needed.
More info in MSDN: Introduction to HTAs
In SO: HTA's; use other browser to host?
I wouldn't try to use a .HTA file, I would use Node-Webkit. Node-Webkit will let you do the same things as .HTA files will, but Node-Webkit seems to be faster and it is better supported. https://github.com/rogerwang/node-webkit; https://github.com/rogerwang/node-webkit/wiki/Manifest-format. Also, with Node-Webkit you can use node.js and easily make your program cross-platform too.
1.Is the hta file still a modern technology for Internet Explorer which is still going to work in IE9, IE10?
Most likely yes. The underlying technology is based on embedding the IE browser control as an activex object. Even if mshta was no longer distributed with windows a replica could still be created using c# and the browser control.
2.Will hta files, with no security issues or local access issues, automatically fire up Firefox/Chrome if IE is not installed on Windows (or other operating systems)?
Nope, although the .hta extension can be associated with those browsers, the mshta directives are not supported by either - the result is that the browser prompts you to save the document as an external file like an exe or zip file would.
3.Can I add some of html5's local storage stuff to my hta file and will it still work on IE, FF and Chrome?
Yes you can add html5 support, but again it will only work on IE.
4.If these things will not work on FF or Chrome, do they have any alternatives which are modern and are not deprecated techs?
Adobe produced a competing product called Adobe AIR - http://www.adobe.com/products/air.html. This product offers a limited intersection of features available in hta's. Local file access is restricted to a specific path, and generally access to the parent operating system is very restricted. However they do operate across all major platforms, including mobile devices, so they are probably the technology you are looking for. AIR uses webkit for the embedded browser engine.
Plz look into electron it's based on v8
http://electron.atom.io