Saving HTML5 offline storage with JavaScript

Source: Internet
Author: User
Document directory
  • Additional reading

Today, when Internet connections are everywhere, we suddenly have another requirement: offline web. Gmail, Google Reader, zoho
These excellent web applications support offline use, thanks to Google gears. However, the real offline Web depends on HTML 5, the future Web
Language stars will develop a set of standards for offline web storage. W3C has released the HTML5 offline storage rules.

Some people may say that offline web is meaningless. What you get is just a lame desktop program. Today, we are online most of the time, this is true, but for those of us who have been indispensable to various web applications, such as email, online news, and Twitter, offline web is very important.

However, there are always some problems. HTML5 web storage rules involve complicated issues, such as 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 standard SQL
There are some differences. In addition, SQLite does not belong to W3C, and its owner is likely to change its interface one day, which will cause those already written web programs to have to be rewritten.

Is there a better way? The Mozilla lab's Atul Varma recently published a blog article that provides an alternative. Varma is studying an experimental version of couchdb. In the browser, the semantics of the database is implemented using JavaScript. In the end, we may be able to directly use JavaScript to implement database queries, eliminating HTML5 problems in this regard.

In response to this article, Mark Finkle of the Mozilla fennec mobile browser team commented that this solution avoids more important issues in the standard database background, and it is best to make localstorage/globalstorage a standard, keeping standards at the underlying level, he pointed out in his blog article that a javascript library should be built, just as many existing JavaScript libraries can operate on web page elements, there should also be a javascript library to operate on offline web storage data.

This method is complex on the surface, but it will bring flexibility to developers. When the Web is omnipotent, we will have more opportunities.

Additional reading
  • Learn more about HTML 5
  • HTML 5 is changing the Web
  • 5 expected functions of HTML 5

International Source: http://www.webmonkey.com/blog/Why_JavaScript_Will_Save_Offline_Storage_in_HTML_5
Source: comsharp CMS official website

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.