为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Open and save a local file with javascript

  • 2 个回答
  • 3 人有此问题
  • 1 次查看
  • 最后回复者为 JanwMe

more options

I doubt if this is the right place for this kind of question, But I don't know where else I should ask this. If there is a better place to ask this please tell me.

I want to create a `webapp` that has sensitive data on it. I want to put that on a usb and be able to run it on every machine with FF without relying on extra extentions/tweaks to the browser. The `webapp` itself therefore can use html/js/css/etc. The data itself will be stored in a lose data file. I want to auto save changes to this file. Temp saving it in a cookie/indexedDB is not an option. So saving it in the normal way isn't an option. The download popup would drive me nuts.

I've read some stuff about the fileSystem api and Mozilla's alternative DeviceStorageAPI. Neither seem like an option. IndexedDB is no option because it saves data to the browser.

Is there a way to save a file without prompt? Or any other way to accomplish what I want to do?

A few of the sources I've red. https://hacks.mozilla.org/2012/07/why-no-filesystem-api-in-firefox/ http://caniuse.com/#search=filesystem https://developer.mozilla.org/en-US/docs/WebAPI/Device_Storage https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

I doubt if this is the right place for this kind of question, But I don't know where else I should ask this. If there is a better place to ask this please tell me. I want to create a `webapp` that has sensitive data on it. I want to put that on a usb and be able to run it on every machine with FF without relying on extra extentions/tweaks to the browser. The `webapp` itself therefore can use html/js/css/etc. The data itself will be stored in a lose data file. I want to auto save changes to this file. Temp saving it in a cookie/indexedDB is not an option. So saving it in the normal way isn't an option. The download popup would drive me nuts. I've read some stuff about the fileSystem api and Mozilla's alternative DeviceStorageAPI. Neither seem like an option. IndexedDB is no option because it saves data to the browser. Is there a way to save a file without prompt? Or any other way to accomplish what I want to do? A few of the sources I've red. https://hacks.mozilla.org/2012/07/why-no-filesystem-api-in-firefox/ http://caniuse.com/#search=filesystem https://developer.mozilla.org/en-US/docs/WebAPI/Device_Storage https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

所有回复 (2)

more options

As a short term workaround, you could package it with Firefox on the USB flash drive to work around the tendency of the installed Firefox to look to its own profile folder.

Possible discussion forums:

(1) Add-ons - https://forums.mozilla.org/addons/

Not sure if they talk about webapps or just the more conventional kinds of add-ons.

(2) Mozillazine - http://forums.mozillazine.org/

Again, not sure there is a board for this yet.

more options

Hi Jscher2000,

Thanks for the quick reply. Installing FF also on the USB isn't a bad idea. But it's not the method I prefer.

I've made a thread on forums.mozillazine.org