I need an offline caching system where my app can store about 0.5 MB of data. It is preferred that there is no interaction required by the user, but small amount of user interaction might be acceptable

Currently, Microsoft's Silverlight is being used to store data offline. It is a large download for the plugin, and not installed as standard on most machines.

I have been considering cookies - but they are far too volatile. I can imagine numerous reasons someone might clear their browser cache and lose all their data.

I am not sure about HTML 5 storage, and how volatile it is in practice.

I have been looking into flash, which is installed on over 97% of windows computers. It seems I can load data from a user selected file, and save data to a user selected file.

My questions...

  1. How big is the microsoft silverlight plugin download (in MB) for windows? (I think about 8mb, but did not get clear answer from the internet)

  2. How can users accidentally (or deliberately without realizing the consequence) clear their HTML 5 storage on common browsers?

  3. Is there a way to get flash to store or load data from local files without user interaction?

  4. Is there another alternative I have not considered?

有帮助吗?

解决方案

Well you could use Flash shared Object storage, which will allow between 0 and unlimited space. Check this settings panel for details of your own settings to get a better idea of what I mean.

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html

Of course this does mean that the user will have to allow third party flash content to be stored locally, which is the default. Also the default storage space is 100KB, with the user being prompted to allow for a larger amount unless they have previously increased the default themselves. So that's a small draw back, but still workable.

I am not sure how you would access the shared object from within a silverlight app, as I have only used it via a Flash swf. I will do some digging around using javascript and get back to you on that.

Also there is another post that may help you:

Javascript bridge to Flash to store SO "cookies" within flash

其他提示

It sounds like what you need is isolated storage.

I use it with all my silverlight apps and it couldn't be easier to use. With only a few calls you can store and retrieve data programatically.

Edit: I was thinking that your app is already programmed in Silverlight. What is your app programmed in? Is it simply HTML/CSS at the moment?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top