Open Bug 1187300 Opened 9 years ago Updated 2 years ago

Verify if interception occurs for channels created by Downloads.jsm when possible

Categories

(Core :: DOM: Service Workers, task, P3)

task

Tracking

()

Tracking Status
firefox42 --- affected

People

(Reporter: jaoo, Unassigned)

References

(Blocks 1 open bug)

Details

Let's not block v1 on this but fix it.
Blocks: ServiceWorkers-postv1
No longer blocks: ServiceWorkers-v1
Priority: -- → P3

:annevk, is there an (actionable) gap to the spec here?

Flags: needinfo?(annevk)

Having read through the bug this blocks, it sounds like user-initiated downloads are not intercepted by the service worker. Such downloads can also be paused and resumed at a later time (is that through range requests?).

Downloads are not well-defined by specifications and there's a couple of variants. I'm pretty sure at least some can be intercepted (as they are navigations that turn into downloads) and I think it would be bad if those did not work in Firefox, but Josh's comment seems to suggest they do work.

Non-navigations and resumption seem trickier however:

  1. In general range requests are underspecified and have a number of thorny issues that haven't been fully sorted.
  2. Executing script in a service worker when no document is open and no permission is given feels wrong. Five years ago this was perhaps more reasonable, but I think our model now ought to be that we do not execute script unless the user is visiting the site (with a notable exception for push notifications, which do require a permission, mind).

Questions:

  1. This blocks ServiceWorkers-compat, what sites are breaking and how?
  2. What do Chrome and Safari do for downloads? (As per above there's multiple paths to downloads, right click "Save Image As", download="", Content-Disposition, ?; and we should test all.)
Flags: needinfo?(annevk)
Summary: Interception never occurs for channels created by Downloads.jsm → Verify if interception occurs for channels created by Downloads.jsm when possible
Type: defect → task
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.