I'm working on a simple TODO list app based on localStorage HTML5 feature:
http://hamen.github.com/webnotes/
I'm wondering if it's possible to import/export data in some way. How could I provide an "Export note/Import note" feature to make users being able to save their note on their HD and import them in another browser profile?
Thanks
Because HTML5 local storage is natively integrated into Web browsers, it is available without third-party browser plug-ins. It is described in the HTML5 specifications. Local storage is mainly used to store and retrieve data in HTML pages from the same domain.
On the downside, localStorage is potentially vulnerable to cross-site scripting (XSS) attacks. If an attacker can inject malicious JavaScript into a webpage, they can steal an access token in localStorage. Also, unlike cookies, localStorage doesn't provide secure attributes that you can set to block attacks.
“how to display local storage data in html” Code Answer's It's simple. Just go to the developer tools by pressing F12 , then go to the Application tab. In the Storage section expand Local Storage. After that, you'll see all your browser's local storage there.
I think you can use the "HTML File API" to load from file and a "Data URI" (http://en.wikipedia.org/wiki/Data_URI_scheme) to save.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With