Let JavaScript save HTML5 's offline storage

Source: Internet
Author: User
Tags sqlite

When Internet connectivity is ubiquitous today, we suddenly have another requirement, offline Web. Gmail, Google Reader, Zoho these excellent Web apps all support offline use, thanks to Google Gears. While the real offline Web relies on HTML 5, the future Web Language star will set a standard for offline storage for the Web, and the consortium has released HTML5 offline storage details.

One might say that offline Web is meaningless, you get just a crappy desktop program, in Wi-Fi, 3G ubiquitous today, we are most of the time online, which is true, but those of us who have been on a variety of WEB applications, such as email, online news and Twitter for a moment do not Offline Web is very important for people who are available or missing.

However, the problem is always there, HTML5 Web storage rules involved in a very complex problem, SQLite. Those who need to write offline Web programs need to write SQL code, SQLite is not wrong, but it is a variant of SQL, and the standard SQL is somewhat different, in addition, SQLite does not belong to the consortium, its owner is likely to change its interface one day, which will lead to those who have written the WEB program Must be rewritten.

Is there a better way? Atul Varma of the Mozilla lab recently released a blog post offering an alternative. Varma is studying an experimental version of CouchDB, which in the browser implements the semantics of the database in JavaScript. Ultimately, we might be able to use JavaScript directly to implement database queries, eliminating HTML5 problems in this area.

For this article, Mark Finkle, of the Mozilla Fennec Mobile browser team, said in a commentary that this scheme avoids more major problems in the background of standard databases, and that it is better to make localstorage/globalstorage a standard, keeping the standard at the bottom, In one of his blog posts, he points out that a JavaScript library should be built, just as many of the existing JavaScript libraries can manipulate page elements, and there should be a JavaScript library to manipulate offline WEB storage data.

This approach is superficially complex, but it will give developers a lot of flexibility, and we'll have more opportunities when the Web is omnipotent.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.