Skip to content

Commit

Permalink
Merge pull request #292 from goddamnhippie/safari_cache_fix
Browse files Browse the repository at this point in the history
Prevent AJAX caching errors
  • Loading branch information
jnicklas committed Sep 10, 2015
2 parents d629509 + 2a78fd8 commit 296402d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/refile.js
Expand Up @@ -63,6 +63,7 @@
if(input.getAttribute("data-presigned")) {
dispatchEvent(input, "presign:start");
var presignXhr = new XMLHttpRequest();
var presignUrl = url + "?t=" + Date.now() + "." + index;
presignXhr.addEventListener("load", function() {
dispatchEvent(input, "presign:complete");
if(isSuccess(presignXhr)) {
Expand All @@ -77,7 +78,7 @@
xhr.complete = true;
};
});
presignXhr.open("GET", url, true);
presignXhr.open("GET", presignUrl, true);
presignXhr.send();
} else {
xhr.open("POST", url, true);
Expand Down

0 comments on commit 296402d

Please sign in to comment.