There are a collection of facilities that are available to developers using HTML5 that enable an HTML5 app to run when no connection to the internet is available.
Of course, the first access to the app requires an internet connection but during that first experience the browser can use AppCache to save the required resources locally so that they are present later when a network connection is not available. Clever use of the NETWORK and FALLBACK sections help you tailor the app’s experience based on the network connection state.
Local Storage and IndexedDB provide facilities to store needed data for use both online and off. window.navigator.onLine and associated event listeners can even help you switch state at runtime.
So technology is in place for building offline HTML5 apps. At Mozilla we’re busy building an HTML5 apps run-time for running HTML5 apps on Windows, Mac,Linux and Android, a marketplace for distribution of such apps, and a cool HTML5 based phone operating system (Firefox OS).
So for the last 10 months or so I’ve been really focused on HTML5 “apps” and I’m especially excited about the B2G Phone OS but it does leave me with the question, how much do folks really need off line functionality in an HTML5 app ?
Fault Tolerant Cloud Based Hosting has become a norm in recent years and the service levels have been very reliable so the question become the utility of the proverbial “last mile”.
For mobile users there are two questions.
1.) Is there service everywhere I need there to be.
2.) How much will use effect my service plan.
Here in rural New England, where I live, there are many spots without cell service coverage. However I tend to only experience them when I’m driving in between places that DO have coverage so the inconvenience is minimal.
As to the data usage, my monthly service contract comes with a monthly data allowance. If my internet usage surpasses that allocation AT&T just automatically adds another “block” of usage to my bill for that month. (I think the increment is $20USD) – So at least it’s not like the old days when you exceeded your plan, silently went into a high-price-by-the-minute plan and got surprised by a $1,000 cell phone bill at the end of the month.
But, the way that it works in the USA and Europe is not necessarily the way it works in the resat of the world.
For example, Mozilla’s phone OS initiative is expected to launch in Brazil first (read more here) but consumer usage profiles in Brazil are very different. Something like 85% of cell phones are acquired on prepaid / pay-as-you-go contracts. This means when you run out of prepaid data access, you’re done until you buy more. Local experts also inform us that “public” use of smart phones is significantly curtailed due to theft concerns, etc.
So share your thoughts on the following two questions.
1.) How much does OFF LINE functionality matter for a desktop app?
2.) How much does OFF LINE functionality matter for a MOBILE phone or tablet app?
I can tell you a few things:
– I wouldn’t expect most desktop apps to care about being OFFLINE, but it is the environment where temporary disconnects are the least common.
– trying to install a Windows 2008 Server with Microsoft software can also fail if their is no Internet connection (depending on the task).
– A properly setup html5 app/site with offline support might actually perform better than one which doesn’t have offline support. At least on second use.
Lenny,
You’re correct not only will performance be better, but you take load of the hosting serves and network.
For this question though, I’m more interested in how much the consumer cares if the app works off-line.
I would say that it might not be so necessary for some things, but I would definitely apply it to areas like message queuing and reliable delivery. Could be useful for in flight stuff, or when you want the 4G off to save power, only connecting when necessary. There’s value.
Very.
[…] How important is HTML5 Off Line ? – Joe Stagner discusses the role of Offline support in HTML5, especially how important it is in making good affordable mobile applications. […]
Hi Joe, I don’t think it’s so important for the majority of people when they start using an app, if they don’t need offline support because of their job, but that’s not the majority of people. I guess it will become useful to everyone, sooner or later, but when people realize they need it, they can’t have it, because they are offline.
As a conclusion, even if people don’t care about it, it’ll be very useful, most of all for a mobile device.
The importance varies with the nature of the application and its intended use. For us it is very important that the end user should be able to use our application when disconnected as they need to capture data in places where they are sure to not have connectivity for long periods of time.
on my phone, tge key apps needing offline are mail and feed reader – things i use to catch up on my commute. I imagine something like an ebook reader would benefit significantly from offline mode for train and plane reading. It all depends on the app though and how it’s going to be used
When I travel out of country, I normally don’t enable data roaming due to the exorbinant costs associated with it. So when I arrive at my hotel I sometimes need access to my confirmation number or other information before I get a network connection.
Having to have an initial network connection is also not acceptable if I turned my phone off during the flight.
Having lived in China where internet is sketchy with a pay-as-you go plan I say that offline support is quite important.
I can use my dictionary apps freely without worry, but I have a ot of trouble with some of my podcast apps, because it is not clear if they have downloaded and cached a podcast or if I’ll be streaming it (something I can’t afford if it’s a video) This makes iTunes U app useless for example.
The same goes for email. When I’ve left the house and I can’t open the email with address because I forgot to charge my phone. What do I do then?
Since much important communication happens on social networks, I often find myself needing to read these. So what do I do if linkedin is blocked today on mobile but not on wifi? Again I risk being screwed if I leave the house and need to re-check some important information i was looking at earlier.
Same for maps. If I reopen maps and there is nothing, I might be screwed. Reliable caching can be a live saver.
Even if I have internet, why do I have to wait and redownload data over a slow connection, five times just to check if I’m on the right metro line?
But Joe, have you ever tried the web apps developed for the iPhone? Try using Financial Times irregularly, and you’ll see how much of a pain in the ass not having proper off-line support is for apps. Every other time you open the FT web app it has to redownload all js and css (and that’s a lot and takes time even over a good connection)
Personally, I think it’s fundamental for HTML5 as a platform, and should be fleshed out on the desktop and mobile as a way to further fight against walled gardens. I know the web’s greatest strength is how trivial it is to connect people and apps, but not every usage scenario requires it.
Don’t deny people an awes–er– “wonderful” platform just because they don’t have rich data infrastructure. Don’t punish them for circumstances they can’t control. B2G should be useful and delightful all the time.
I believe the greatest benefit of robust, seamless offline support will be to regions with incomplete infrastructures. A B2G desktop USB key or mobile device can silently save everything users do offline, and sync up when he/she can get on. If offline-capable apps designed well and add value when connected, users will clearly see that while they are not DENIED essential functionality when disconnected, the benefits of the open web are immense. Then, let’s hope, they can push for real change (or at least spur demand) for better internet access wherever they are.
I would love for B2G to do what Nokia’s Series 40 SHOULD be doing: bringing the open web on an open platform to another billion people, in an affordable way.
I think it depends hugely on the type of app.
Anything that fulfils a key role (such as email), will have any connection outages cause enormous pain, and make switching from a native app to a web app impossible. We are using trello to manage our product roadmap, and if the internet is offline, or at an offsite meeting – lack of internet can be infuriating.
For less essential apps, connection outage becomes more an annoyance than prohibitive, but could still put your app at a disadvantage.
I should note that I currently live and work in China where the internet can be intermittent and slow for sites hosted outside of China. In addition I do spend a large amount of time travelling for work, and any webapp that has offline access instantly becomes more appealing in these conditions.
I am developing a couple of webapps at the moment, and recognise the extra engineering complications. However if you are looking at something that will compete with native iphone / android apps you instantly put yourself at a disadvantage if offline access is not included.
Ironically as I come to post this – the office connection has just dropped!
I agree that the importance of an offline web-based application depends on the type of the app. If the app/system is intended to replace what people are already using everyday, it will be really important. And if the market is a developing country, then it will be even more important.
For example, internet connection is still quite expensive here in Indonesia. Most people here still rely on fully offline applications. We go online to internet cafe or put on our 3G USB modem when we really need it. Cable internet is expensive, Wi-Fi networks in public spaces still rare to find. Even tough now the prices start to get cheaper, internet here is still painfully slow. Of course it will be different if we live in a big cities, like Jakarta or Bandung perhaps. I believe having a Chromebook (for example, which most apps rely on internet connection) in a country like Indonesia now is a ridiculous decision.
[…] I recently asked my readers how important they think “off-line” support for HTML5 apps i… […]
It seems to me that this is chicken-and-egg.
Most folk right now don’t really see the need for an offline app, because there are not so many out there that do something they consider useful.
The benefit of HTML5 is the ability to build apps that go cross-platform, can be packaged for any of the common online stores and install easily from any website. Right now all of these are “web” apps, so online is the norm.
But if we really could use HTML5 as the base programming platform for just about anything the phone can do then its a game-changer. I can build it once (or maybe for 2-3 different screen-sizes). At this point I’d consider switching since I would not need to have separate dev and test setups doe iOS, Android or whatever is shipping next week.