最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ImportExport HTML5 localStorage data - Stack Overflow

programmeradmin5浏览0评论

I'm working on a simple TODO list app based on localStorage HTML5 feature:

/

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

I'm working on a simple TODO list app based on localStorage HTML5 feature:

http://hamen.github./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

Share Improve this question asked May 16, 2010 at 21:41 Ivan MorgilloIvan Morgillo 3,8445 gold badges31 silver badges47 bronze badges 1
  • 1 I'm interested in this too. The best I've thought of so far (without server-side code) isn't very nice: dump the data a JSON or something into a textarea or div, and let the user copy/paste it. If you can program the server, of course, you can have your site just bundle up the data, post it to the server, and have the server respond with a downloadable attachment. – Pointy Commented May 16, 2010 at 21:50
Add a ment  | 

1 Answer 1

Reset to default 13

I think you can use the "HTML File API" to load from file and a "Data URI" (http://en.wikipedia/wiki/Data_URI_scheme) to save.

发布评论

评论列表(0)

  1. 暂无评论