Offline HTML5 Application vs IE8

I have been researching ways to achieve an offline HTML5 application in a corporate environment. I would certainly have no issues convincing the powers that be that HTML5 applications are the way to go and we should be developing new apps along that path.

alas, I am defeated by IE8. I’ll list the options that I came up with to make an HTML5 offline app viable in corporate-land.

  1. Use a Cache Manifest to get the browser to cache the files for the app and still open when offline.
    IE8 does not support Cache Manifests, and neither does IE9. While we are constrained to supporting IE this won’t work until IE10 is approved through the company.
  2. Use Google Gears.
    This means going through the hassle of getting google gears deployed to machines, and then building the app to specifically support google gears. Since gears is now deprecated this isn’t a very forward-looking solution.
  3. Winforms Wrapper. The idea was to make a windows application that included all the html/css/javascript/image files and opened these local files in an embedded web browser control, with ajax calls to a web service to save/fetch data while storing temporary work in localstorage.
    Firstly, using the winforms WebBrowser control does not work as it defaults to IE6 rendering or something, so doesn’t know about local storage or any other web developments in the last ten years. I found suggestions that you can force it to run in IE8 rendering with some registry hacks, but that’s not something I’d like to be mucking around with on user’s machines just to get it to work. Also, this is a rubbish solution from Microsoft, having to change registry values instead of API methods/properties on the control itself.
  4. Create a WPF Wrapper Application.
    Creating a simliar wrapper application with WPF was slightly better in that it ran as IE8 rendering and actually rendered the page properly. Problem is that LocalStorage is not available.
  5. Console application to launch IE8 with local file
    Next attempt was making a console app as a Launcher to open the browser directly to the local file. This is not as tidy as the previous options, but at least it would work i thought. but no. Turns out files opened locally in IE cannot access LocalStorage as they don’t have a domain. This will have been what was blocking the option above as well it seems.
  6. WebKit.Net Browser Control
    I grabbed the WebKit.Net project to be able to host a webkit browser control inside a wrapper application. This looked good at first – the app loaded and had no errors dealing with LocalStorage! if I saved data in LocalStorage and refreshed the page, it would still be there! looking good. Except that when you close the application the LocalStorage is cleared, obviously only held in memory while the control instance exists. If there was some way to capture the localstorage events through the control then we could handle saving/loading ourselves, but there is nothing there right now so would be a fairly significant undertaking to get the LocalStorage working.

So, after all these options I’m pretty much out. Getting an HTML5 app working in offline mode in a corporate environment restricted to IE8 is certainly no trivial task.

This entry was posted in HTML5, Javascript, jQuery, Web Devleopment and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s