Skip to content

Browser downloads

Ng Guoyou edited this page Jul 13, 2026 · 2 revisions

Browser downloads

Ordinary browser downloads are an explicit opt-in integration. Save In can record matching browser-owned downloads in History without treating them as extension-owned retries or notifications.

URL filters

Include and exclude filters use WebExtension match patterns, one per line—not regular expressions. A pattern has a scheme, host, and path:

https://*.example.com/files/*

Use *:// for HTTP and HTTPS. Match patterns do not directly match query parameters or explicit ports. Exclusions take precedence. Leaving the include list blank covers every otherwise eligible ordinary download.

Chrome routing

Chrome can route matching downloads through downloads.onDeterminingFilename. The listener is registered synchronously and either suggests the routed filename or explicitly declines to change it.

Downloads started by Save In or another extension are excluded so they are not adopted twice.

Firefox experimental replacement

Firefox does not currently provide the same filename-decision API. Its separately labelled experimental option cancels a matching HTTP(S) download and starts a routed replacement.

This can fail or change behavior for:

  • POST downloads
  • Expiring or one-time URLs
  • Blob and special browser URLs
  • Authentication or request-specific headers
  • Downloads requiring temporary page context

Use tracking-only mode unless replacement is worth those tradeoffs.

Browser-owned downloads expose fewer variables than a page/context-menu save. Page title, link text, selection, menu metadata, and key modifiers are generally unavailable.

When the browser reports them, routing rules can use mime: / contenttype: and referrerurl: / referrerdomain: for ordinary downloads. Referrer metadata may be blank for privacy, policy, or request-context reasons. Page and source root-domain matchers remain available whenever their corresponding URLs are available.

Clone this wiki locally