I'm developing a website. But it caches user name and password in cache block which can be accessed using hacking software like winhex. I want to clear cache
$(".object-position").livequery("change", function() {
$("#objects-list input").attr('disabled', true);
var action = $(this).attr('name');
var position = $(this).attr('value');
var id = $(this).attr("id");
var model = id.split("-")[0];
var object_id = id.split("-")[1];
$("#loader").show();
$("#loader").fadeIn(200);
$.ajax({
type: "POST",
async: true,
url: "/manage/update_position/",
data: "action=" + action + "&model=" + model + "&object_id=" + object_id + "&position=" + position,
dataType: "json",
success: function(data){
$("#loader").fadeOut("fast", function () {
$("#loader").hide();
});
$("objects-list").html(data["html"]);
$("#message").show();
$("#message").fadeIn(400).html('<span>'+data["message"]+'</span>');
setTimeout(function(){
$("#message").fadeOut("slow", function () {
$("#message").hide();
});
}, 1500);
}
});
$("#objects-list input").attr("disabled", false);
return false;
});
I'm developing a website. But it caches user name and password in cache block which can be accessed using hacking software like winhex. I want to clear cache
$(".object-position").livequery("change", function() {
$("#objects-list input").attr('disabled', true);
var action = $(this).attr('name');
var position = $(this).attr('value');
var id = $(this).attr("id");
var model = id.split("-")[0];
var object_id = id.split("-")[1];
$("#loader").show();
$("#loader").fadeIn(200);
$.ajax({
type: "POST",
async: true,
url: "/manage/update_position/",
data: "action=" + action + "&model=" + model + "&object_id=" + object_id + "&position=" + position,
dataType: "json",
success: function(data){
$("#loader").fadeOut("fast", function () {
$("#loader").hide();
});
$("objects-list").html(data["html"]);
$("#message").show();
$("#message").fadeIn(400).html('<span>'+data["message"]+'</span>');
setTimeout(function(){
$("#message").fadeOut("slow", function () {
$("#message").hide();
});
}, 1500);
}
});
$("#objects-list input").attr("disabled", false);
return false;
});
Share
Improve this question
edited Apr 20, 2017 at 11:29
user688
3613 silver badges23 bronze badges
asked Apr 20, 2017 at 10:07
Amit GujarathiAmit Gujarathi
1,1001 gold badge13 silver badges25 bronze badges
5
|
1 Answer
Reset to default 13This meta code should work with most browsers for web content. However, for resource files (javascript, images, css) your mileage may vary. Most cache busting strategies involve changing the name of your resource files (perhaps dynamically) or using Apache rewrite rules to pretend that the names are changed. This google search should put you on the right track.(cache busting strategy for js)
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
autocomplete=off
;) – Tushar Gupta Commented Apr 20, 2017 at 10:09