diff --git a/static/js/getTextFromFile.js b/static/js/getTextFromFile.js index c0c0dda2..7fff353c 100644 --- a/static/js/getTextFromFile.js +++ b/static/js/getTextFromFile.js @@ -1,8 +1,10 @@ async function getTextFromFileUrlAsync(url) { return new Promise(function (resolve, reject) { var req = new XMLHttpRequest(); - req.setRequestHeader("Cache-Control: no-cache, no-store, must-revalidate") req.open("GET",url, true); + for (const item of ["no-cache","no-store","must-revalidate"]) { + req.setRequestHeader("Cache-Control",item) + } req.onreadystatechange = function() { if (req.readyState == 4) { if (req.status == 200) {//when a good response is given do this