One of the most useful new features in
html 5 is the standardization of local storage. Ultimately, WEB developers can no longer attempt to fill all client data into 4 KB of Cookies. Now you can use a simple API to store large amounts of data on the client. This is a perfect caching mechanism that can dramatically increase the speed of your applications--speed is a critical factor for mobile WEB applications because they rely on a much slower connection than desktop applications. In the second article of this series on HTML 5, you'll learn how to use local storage, how to debug it, and how to use it to improve WEB applications. The Local Storage Foundation Web Developer has been trying to store data on the client for years. HTTP Cookies are misused for this purpose. The developer squeezes large amounts of data on the 4KB assigned by the HTTP specification. The reason is simple. For a variety of reasons, interactive Web applications need to store data, and storing it on the server is often inefficient, insecure, or inappropriate. Over the years, there have been several alternatives to this problem. A variety of browsers have introduced proprietary storage APIs. Developers also took advantage of the extended storage capabilities in Flash Player (implemented via JavaScript). Similarly, Google created the Gears plugin for various browsers, and it contains the storage API. Not surprisingly, some JavaScript libraries try to flatten these differences. In other words, these libraries provide a simple API and then check what storage capabilities (perhaps a proprietary browser API or a plug-in like Flash). Fortunately for Web developers, the HTML 5 specification ultimately contains a standard for local storage that is implemented by a wide range of browsers. In fact, the standard is the fastest adopted standard and is supported in the latest versions of all major browsers: Microsoft®, Internet Explorer®, Mozilla Firefox, Opera, Apple Safari, and Google Chrome. More important for mobile developers, it is supported in WebKit-based browsers such as iphones and browsers using Android (version 2.0 or later) and other mobile browsers such as Mozilla's Fennec. With this in mind, let's take a look at this API. |
Detailed Description: http://html5.662p.com/thread-50-1-1.html