【问题标题】:How can I set the network.http.response.timeout in Firefox with javascript?如何使用 javascript 在 Firefox 中设置 network.http.response.timeout?
【发布时间】:2014-05-21 12:36:26
【问题描述】:

network.http.response.timeout 已从 Firefox 版本 28 中的未设置更改为版本 29 中的默认限制 300(5 分钟)。(see this blog entry at morgb.blogspot.de)。

如果需要,我想在 Firefox 插件的帮助下将其改回更高的值。

或者向我的网络应用程序添加一个警告(由于多种原因需要更长的超时时间)。

【问题讨论】:

标签: javascript firefox configuration


【解决方案1】:

使用addon-sdk 创建一个名为“response-timeout-24-hours”的插件并将其放入您的main.js

const {Cc,Ci} = require("chrome");
var pref = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
console.log(pref.setIntPref("network.http.response.timeout", 3600*24));
console.log("timeout set to "+pref.getIntPref("network.http.response.timeout")+"s by response-timeout-24-hours");

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-01-19
  • 1970-01-01
  • 1970-01-01
  • 2014-09-01
  • 1970-01-01
  • 2010-10-07
  • 1970-01-01
相关资源
最近更新 更多