Write local file with jQuery or Javascript

后端 未结 4 1721
悲&欢浪女
悲&欢浪女 2020-12-21 00:31

I am creating a prototype that will be run in a web browser. I would like to store (and retrieve) various info submitted by a user during the use of the prototype. I know I

相关标签:
4条回答
  • 2020-12-21 00:37

    The web platform is specifically designed to prevent sites from writing arbitrary data to client machines. There are a few exceptions to this that you can explore:

    • A plugin like Google Gears; or data store in HTML5 (not widely available) (easily lost)
    • Cookies (easily lost)
    • URL (limited by length, easily lost)
    • Files (more conventional albeit clumsy)

    The web clearly operates better from a server. If you are hoping to deploy desktop installs, you can deploy a thick application that uses a lot of browser-based UI. That app could easily have access to the local system for files, etc. If a possibility, please comment.

    0 讨论(0)
  • 2020-12-21 00:42

    I agree with all the opinion that it is difficult to store data in client side using JavaScript. If we have to create a stand alone application then adobe air seems to be promising. As per specs and features stated by adobe we can use JavaScript and html skill to create an application also it allows you to read /write to a local storage in file or database.

    0 讨论(0)
  • 2020-12-21 00:59

    You can use flash for storing data. By default it allows you store up to 100 kb and you can have more with getting permission from user.

    You can find more information from google

    0 讨论(0)
  • 2020-12-21 01:00

    If the limitations of using Internet Explorer and all those issues of trust (permission to write to a users file system using javascript is probably only ever going to be possible on an intranet) then you can use the Scripting.fileSystemObject as per this msdn page.

    0 讨论(0)
提交回复
热议问题