Someday soon, users may be able to interact with their favorite websites even when these sites aren't accessible, thanks to a new browser standard called Service Workers being developed by Google.
With Service Workers, "We can make sure when you go to your site, it always feels responsive, that it is always there, even if it isn't up-to-date," explained Google software engineer Alex Russell at the O'Reilly Velocity conference, held this week in New York.
A Service Worker "is basically an in-browser proxy that gives you the power to script what happens before you go to the network, and what happens after you get back from the network," Russell explained to an audience of Web developers and administrators.
Russell is a co-editor of a World Wide Web Consortium draft specifying how Service Workers should be implemented in browsers.
Service Workers would provide a space on the user's browser for offline processing, allowing a website to store documents, and offer resources. It could also speed delivery of Web content by reducing the amount of back-and-forth communication that goes on between a browser and a server.
Web users are accustomed to seeing only a simple error statement if a browser can't access a website. This however, is an anachronism, a primitive approach compared to how modern desktop applications work, Russell explained.
For instance, a person using a smartphone may enter a subway station with Wi-Fi access and, while waiting for a train, check in at a favored news site. Boarding a train, the user clicks on a news story from the site, but as the train leaves the station, the phone loses access and the Web page fails to load.
"You're in limbo. You can't go forward and you can't go back. This is a really terrible user experience and it makes us not trust the Web," Russell said.
"Native applications make a different break," Russell said. "The user interface they surface to you will probably work, and if it doesn't work, it will probably tell you why it is not working, and it does so because it is loading something instead of nothing."
"That is the key differentiator. We want to load something instead of nothing," Russell said.
Service Workers allow the developer to treat a Web page like a desktop application, with a shell stored locally to serve as the initial user interface. A Service Worker could fill the shell with information if the site is offline, providing the user with cached pages, or other information and functionality to peruse until access is restored.
This could change the nature in which Web pages are delivered in a number of ways, Russell explained.
Sign up for CIO Asia eNewsletters.