This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: Web Development

Bringing Web-based applications offline

By Joe 'Zonker' Brockmeier on March 14, 2007 (7:00:00 AM)

Share    Print    Comments   

The Web 2.0 mantra suggests that you forget desktop applications and embrace AJAXified browser-based apps that you can run from any OS, anywhere, as long as you have a speedy connection to the Internet. But what about times when you can't get online? Firefox, Opera, and others are looking to make it possible run applications offline, anytime, anywhere.

Many frequent travelers, myself included, live in their webmail, Web-based calendars, and other online applications. It makes sense for "road warriors" to seek out applications that are only a Web browser away. However, that becomes something of an issue when you're stuck in Denver International Airport thanks to a freak snowstorm.

Understanding offline support

Offline mode lets users browse documents that are stored locally without trying to fetch information from the Web. This is useful, but it's not of much help when you're trying to use an application like Google Docs, which assumes that you will be saving information to Google's servers. Nowadays, developers are working to make Web-based applications usable when you're not connected to the Web. This means that applications will be able to verify whether you are online, and if not, store information locally to be saved online later. They'll let you work with information stored locally rather than trying to retrieve information from a remote server.

Microsoft has offered HTML Applications (HTA) for some time, which can be distributed as offline applications. However, HTAs are not cross-browser compatible.

Fortunately, standards are on the horizon. The Web Hypertext Application Technology Working Group (WHATWG) is working on standards for Web applications, including specs for persistent storage and offline Web applications.

Firefox 3.0 has offline support in its roadmap. Firefox developer Mark Finkle has been blogging about its offline capabilities, and Firefox developer Chris Double has been adding offline support to Zimbra, a Web-based open source messaging application, as a proof of concept for Firefox's offline support.

Jan Standal, director of product management for Opera, says that Opera is also seeing interest in offline application support. Right now, Standal says Opera supports client-side storage of Web applications as Opera Widgets, but the company is also implementing storage for applications as specified by the WHATWG specification.

Standal says that Opera is seeing a lot of demand for offline apps, particularly for mobile devices. "Immediate access to the application data will be especially important for mobile phones and other types of devices where connection speed can be very limited and there is often no network available to the user at all. With Opera 9 we support Widgets on devices like PCs and mobile phones, and we see lots of request from the developer community for enhancing this with client-side storage capabilities."

Offline support isn't a new idea, but it is seeing a resurgence. Tom Snyder, founder and president of iNetOffice, a vendor of online document management software, says that Internet Explorer has had the ability to run HTML Applications for some time, but it wasn't "as rich and full-featured as we hoped for."

Firefox has also had modest offline features for some time, but only using normal disk cache to display pages -- which isn't sufficient for applications like Gmail or Zimbra. Finkle says the new features were "somewhat spurred by the offline features of the WHATWG" specification, and that patches and code for Firefox's offline features started turning up last May.

According to Finkle, offline features are "a high priority" for Firefox 3.x, but "we are still in the process of developing requirements for the features. Some detail or problem could arise that causes the feature to be re-prioritized."

If they build it, will you come?

While developers are itching for offline support, and road warriors may be eager to be able to use Gmail while stuck in the airport, what about the majority of users who don't try to access online applications from anywhere but the comfort of their own home?

It's possible that offline support will only be used by a small percentage of users, but Finkle says that it's still worth pursuing. "One of the most frequently cited reasons for organizations not adopting Web applications is the lack of offline availability. Even if most users don't need it, offline support removes a barrier to Web application adoption."

Another challenge is cross-platform compatibility. Historically, Web developers have had to deal with incompatibilities between major browsers that mean either targeting a single browser or doing a lot of workarounds and spending additional development and testing time to ensure that applications work in every browser.

Finkle says that, where Firefox goes beyond the WHATWG standard to provide features not in WHATWG, Firefox developers "hope that other browsers will implement our APIs. We've tried to keep things as simple as possible to make that easy. Many of the necessary APIs are WHATWG standards already, and we will work with appropriate standards bodies on the rest."

He also says that developers are creating libraries to make life easier for offline support. "We'll likely see JavaScript libraries assisting Web developers with cross-browser offline mode issues. Projects like Dojo are developing components that enable offline applications in any browser, although their experience may not be as seamless without direct browser support."

Standal says that Opera has "a strong commitment to follow the specifications," such as WHATWG, and that Web developers should expect nothing less from other browser vendors. As for the possibility of supporting APIs from Firefox that address features that are not part of the WHATWG specification, Standal says that "HTML 5 is still a work in progress" and that Opera can't commit to supporting anything beyond the standard, but that "we are likely to support a similar feature set, based on an updated specification."

Challenges for offline apps

One of the biggest challenges from the Web application standpoint, according to Snyder, is "making it as simple and obvious to the user as possible." Snyder says that, while the online/offline concept is intuitive to folks in the business of developing browsers or Web applications, "for someone running a flower shop ... eyes are going to glaze over, they don't want to understand it, don't really care, they just want it to work."

Snyder says it will be easier to make Web-based applications like spreadsheets or word processors work, because they "are more centralized" and deal with less data. Mail, on the other hand, requires a lot more data. In that case, the application will need to "predict accurately what users need offline. If they only have 30% of what they need available, it's not really worth trying. If they have 95%, they might understand" that some data is unavailable and still be able to get work done.

Standal says data storage will be a challenge, and it will be up to Web application developers to handle it within their applications. The browser vendors can offer the features, but developers will have to modify their applications to suit the new functionality.

In the case of mail, Standal says that developers might choose to have their applications store only the unread or recent email, while the bulk of a user's email will remain on the server. "We expect that most developers will use the client-side storage to cache only the data that is likely to be relevant and interesting for the end user."

It could get a bit sticky if developers decide to try to store all of a user's data for offline use when the user has a lot of data. Finkle says that Firefox will have cache quotas, and ways for developers to see how much room they can utilize on a user's computer. "We also intend to have some APIs for Web applications to query for remaining cache space so they can make intelligent decisions about saving data. We are still working through these technical details."

Share    Print    Comments   


on Bringing Web-based applications offline

Note: Comments are owned by the poster. We are not responsible for their content.

Offline support?

Posted by: Anonymous Coward on March 15, 2007 02:37 AM
What? offline? What is offline?
Offline support? please...... lol

This isnt' the 80's lol.

I am ALWAYS online.

All the time more and more people are getting Internet, and high-speed always on broadband connections, and more people get on internet, and gets faster internet connections.


Re:Offline support?

Posted by: Anonymous Coward on March 15, 2007 03:28 AM
Offline support is important when your network card dies without any previous announcement and you are stuck without the network. Or when you take your laptop around and are forced into a dark corner with low wireless signal strength. Or when you recently installed a system and need to start installing everything.


Re:Offline support?

Posted by: Anonymous Coward on March 15, 2007 12:21 PM
I guess you don't travel much. Connectivity on an airplane? Rare. Easy connectivity during a 2 hr layover in Singapore or Tokyo? No.

I have a laptop with wifi and wireless data service but still have long periods of no connectivity where I need to work.


Get Out Of You Mommy's Basement!

Posted by: Anonymous Coward on March 16, 2007 12:43 AM
You might be surprised at how much of the western world does not offer easy internet access. I frequently travel to places(towns/cities) where I go for several days at a time without any easy internet access. I could get it in an emergency but, 9600bps over a satellite phone is both agonizing and expensive. Beyond that you can often find seedy internet cafes that are not only expensive but also a health hazard and not somewhere that you'd like to frequent.

Unlike Mommy's basement, there are lots of places in the world without cheap low-latency broadband access.


Re: Europe

Posted by: Anonymous Coward on March 16, 2007 12:06 PM
Yeah, like Europe. Most places DO NOT have easily accessible and CHEAP internet access.

Having to take a taxi (in a foreign country) to an internet cafe and pay the equivalent of $7 per 30 minutes is a real pain. And you have to use their crusty old, dirty computers -- not your nifty fast laptop.

Yeah, I'd prefer an offline application.



Posted by: Anonymous Coward on March 15, 2007 05:03 AM
Autonomy and anonimity are analogus to free speech. So there should always be, were posible, access to personel use. Open souce becomes a reasonable advocate weather applications are ment to be cross compatible. Making or allowing open softwere to only "be run for you" enters realms of dependancy that jeprodize the open concept even if everybody ultimatly chooses and want to be "beholden to a third party". Also there is an area were programs are available online for download but all info. is stored private on ones own hardrives and kept private. (the cost of storage makes this a viable alternative) One modle stores your info. on your computer, you then access your computer from anywere rather than some "centralized system".



Posted by: Anonymous Coward on March 15, 2007 11:41 PM
Before your next post, please do at least one of the following:

- Learn to spell.
- Learn to think.

Thank you.


Re: spelling and childish comments

Posted by: Anonymous Coward on March 16, 2007 12:01 PM
Keep in mind, hombre, English isn't the first language of the world. Some of us speak English as a 2nd or 3rd language. Please forgive us if we make errors in spelling.

The original poster made a good point about being able to use "online apps" while offline. Google's word processing application comes to mind. It's not ALL about convenience. Sometimes security and freedom come first.

- English-speaker



Posted by: Anonymous Coward on March 16, 2007 02:33 AM
Off-line? There are far more viruses on my computer than out there on the internet. I'm scared to go off-line! I need to be connected to the Internet so they all have some place to escape to!


can you say Lotus Notes?

Posted by: Administrator on March 16, 2007 08:25 PM
It's always been able to let users use Notes application offline while still being *secure*. Users only get the data they're allowed to modify, the data on the drive is encrypted, users can sign their documents using a built-in PKI infrastruture, etc.

Funny how people are going through hoops to develop what Notes gives you out of the box<nobr> <wbr></nobr>;-)

That said, you could hack up an offline mode in MSIE using their old push technology. I'm glad to see a disconnected web mode is finally being standardized, but I'd bet it's still not going to be as secure and easy to use as Notes was...


Why be offline when you have a mobile phone?

Posted by: Administrator on March 17, 2007 02:20 PM
Most mobile phones run browsers, and their capabilities are growing quickly. Mobiles can also run web servers - sounds crazy, but Nokia have ported the Apache web server to run on their bigger models. AJAXified web apps of the future may be able to run entirely on our mobile phones, using the net (when they can access it) as a second level file cache. The files you need most would be in your mobile. When you need a big screen, public docking stations will allow you to browse the web apps on your mobile. See <a href="" title=""><nobr>l<wbr></nobr> izing-mobiles.html</a>


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya