requestcontrol icon indicating copy to clipboard operation
requestcontrol copied to clipboard

Add support for webRequest freeze

Open Perflyst opened this issue 6 years ago • 2 comments

Currently it is only possible to block request but not possible to timeout a request.

A timeout is needed if a broken website or application re-tries until it succeeds. But if it is blocked it will never succeed and therefore will create endless requests which results in memory leaks and freezing firefox.

Example:

browser.webRequest.onBeforeRequest.addListener(async request => {
  console.log('incoming request', request);
  await new Promise(() => {});
}, {urls: ['https://www.domain.com/*']}, ['blocking']);

Perflyst avatar Jul 17 '19 08:07 Perflyst

Should there be a time limit after the frozen request times out?

tumpio avatar Aug 05 '19 17:08 tumpio

This would may be useful, otherwise there will/can be a memory leak. If possible I would like to have the timeout time limit configureable.

Perflyst avatar Aug 05 '19 17:08 Perflyst