Write local file with jQuery or Javascript

别说谁变了你拦得住时间么 提交于 2019-11-29 14:39:04

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.

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.

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.

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!