Im working on bookmarklets and my issue is js not getting update
I load js file with my bookmarklet, And my problem is its not getting update with my latest version. even also if i have updated it in my database.
So what i want it to check and load latest version when ever bookmark is clicked. so i want to know if there something to add in js file so it get load latest version. Or if there is way to check date and time or check version. etc
I have no problem with codes as they working fine.
Suppose this is my js
function start() {
// codes
};
// ---------------------------------------
// Ajax
// ---------------------------------------
function AJAXInteraction(url, callback) {
var req = init();
req.onreadystatechange = processRequest;
function init() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
else if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
function processRequest() {
if (req.readyState == 4) {
if (req.status == 200) {
if (callback) callback(req.responseText);
}
}
}
this.doGet = function () {
req.open("GET", url, true);
req.send(null);
}
this.doPost = function (str) {
req.open("POST", url, true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
req.send(str);
}
};