get the filename header Content-Disposition via a HTTP HEAD request
download the file
Because downloading the file is a separate request, servers can choose to reject it. Sometimes it's due to the server checking cookies or checking the Referer.
If your download works in Chrome and not in Firefox, it's very likely that this is the cause.
Firefox is missing support for
chrome.downloads.onDeterminingFilename
. To work around this in Firefox, save-in performs separate requests toContent-Disposition
via a HTTP HEAD requestBecause downloading the file is a separate request, servers can choose to reject it. Sometimes it's due to the server checking cookies or checking the
Referer
.If your download works in Chrome and not in Firefox, it's very likely that this is the cause.
The implementation of this API is tracked on Bugzilla: Implement chrome.downloads.onDeterminingFilename