Search code examples
htmlsilverlightlocal-storageindexeddbfileapi

Silverlight local storage equivalent in HTML 5


I want to store config on the client's computer that is persisted per device (not per browser) and access it across all HTML 5 enabled browsers. I can store this config with Silverlight's Isolated Storage where all browsers with this plugin can read it. The shortcoming I see with (my understanding of) the following HTML 5 technologies

Local Storage : Data will be deleted if user clears cache
IndexedDB: Data won't be shared across browsers
File API: Can't read any arbitrary file without permission of user. The user might have to drag and drop the file for me to be able to read it, I am going to store some configs in the file, so I wouldn't want the user to drag and drop the file every time I want to read the config

Is there any project that can help me or some "design pattern" that I can use in such scenarios?
Should I be looking at something outside HTML 5?

Went through the following with no success: https://softwareengineering.stackexchange.com/questions/156682/how-to-move-silverlight-app-to-html5 https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills http://www.manasinc.com/silverlight-and-html5-comparison/


Solution

  • There is no way to persist data if the user clears the cache, the only way to even come close is to store the data on the server side (in relation to a user profile) and then upon the app connecting and sending parameters (such the user agent and screen res) re-download the specific config into cache.

    Furthermore i doubt there is a way to achieve full compatibility with every web browser (as is with most cases) however in terms of storage web storage is the method most compatible with current browsers. http://caniuse.com/#feat=namevalue-storage