var {Cc, components , Cu} = require("chrome");
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
const WebBrowserPersist = components.Constructor("@mozilla.org/embedding/browser/nsWebBrowserPersist;1",
"nsIWebBrowserPersist");
var persist = WebBrowserPersist();
var targetFile = Services.dirsvc.get("Desk", Ci.nsIFile);
targetFile.append("file.bin");
// Obtain the privacy context of the browser window that the URL
// we are downloading comes from. If, and only if, the URL is not
// related to a window, null should be used instead.
persist.persistFlags = persist.PERSIST_FLAGS_FROM_CACHE
| persist.PERSIST_FLAGS_REPLACE_EXISTING_FILES;
persist.saveURI('https://forums.mozilla.org/addons/styles/ca_gen2/imageset/logo.png', null, null, null, "", 'c:\\temp\\', null);
Find more questions by tags Extensions for browsersMozilla Firefox
But still a gesture of some sort) - Pattie.Kuvalis commented on October 3rd 19 at 02:57
The request went and all the headers in the response does not show a cookie does not read, shows simple stuff like Apache, etc. As I cannot understand otherwise, checking whether or not I am... - Pattie.Kuvalis commented on October 3rd 19 at 03:03