Skip to content

Commit

Permalink
GM_xmlhttpRequest: bypass Firefox cache [#7 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornu committed Mar 15, 2009
1 parent 9c7b574 commit 2d51839
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/chrome/content/xmlhttprequester.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ GM_xmlhttpRequester.prototype.chromeStartRequest = function(safeUrl, details) {
}
}

if (details.nocache)
try {
req.channel.loadFlags |=
Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;
} catch (e) {
throw new Error("Could not set 'bypass cache' option");
}

var body = details.data ? details.data : null;
if (details.binary) {
// no binary support?
Expand Down

0 comments on commit 2d51839

Please sign in to comment.