comparison js/core.js @ 3139:bc0ef78bb07a

requestKey uses POST to avoid cache
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 16 Mar 2021 21:02:40 +0000
parents 735d96d343f6
children
comparison
equal deleted inserted replaced
3138:21ee5bcf80a3 3139:bc0ef78bb07a
3891 } 3891 }
3892 3892
3893 function keyPromise() { 3893 function keyPromise() {
3894 return new Promise(function (resolve, reject) { 3894 return new Promise(function (resolve, reject) {
3895 var req = new XMLHttpRequest(); 3895 var req = new XMLHttpRequest();
3896 req.open("GET", returnURL + "php/requestKey.php?saveFilenamePrefix=" + parent.filenamePrefix, true); 3896 req.open("POST", returnURL + "php/requestKey.php?saveFilenamePrefix=" + parent.filenamePrefix, true);
3897 req.onload = function () { 3897 req.onload = function () {
3898 // This is called even on 404 etc 3898 // This is called even on 404 etc
3899 // so check the status 3899 // so check the status
3900 if (req.status == 200) { 3900 if (req.status == 200) {
3901 // Resolve the promise with the response text 3901 // Resolve the promise with the response text