Use Local storage to make your web applications rock(professionalaspnet.com)

submitted by vijaystvijayst(1311) 7 months, 16 days ago

Single page web applications are on the rise that use sophisticated HTML5, Javascript, CSS3. Local Storage is useful for these applications to store application specific data upto 5 MB. This post describes how to use Local storage in your applications.

2 comments |category: |Views: 76

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by dpetersondpeterson(4397) 7 months, 14 days ago 0

At the office I've been using local storage to cache the JSON returned from AJAX requests. This includes search results as well as lazily-loaded page content. As the web application using this strategy relies on static data rather than dynamic content, my caching strategy revolves around a simple database-date cookie which is set server side in a config file. Whenever the database is updated with fresh data, that config file is updated and client side caches in local storage are invalidated and cleared out.

The biggest problem I have run into with local storage is that no API exists for determining how much space you have currently, or more importantly how much you have left available. The current generation of browsers are also inconsistent in how they handle running out of local storage space: It's not easy recover when you attempt to put something into local storage that will exceed its capacity.

Reply

posted by bradygasterbradygaster(4897) 7 months, 14 days ago 0

This is great! I wish I'd had something like this in HTML or even a different mobile client technology a few years back when I was working on mobile apps that required store-and-forward methodologies to do their work and to enable the ability for our business clients to do their work in the field during times of disconnectedness. I did a sample of this using Spine.js.

Reply

information Login or create an account to comment on this story