admin管理员组文章数量:1221291
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" />
本文标签: javascriptHow to clear cache memory on load of HTML pageStack Overflow
版权声明:本文标题:javascript - How to clear cache memory on load of HTML page? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739335404a2158681.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
autocomplete=off
;) – Tushar Gupta Commented Apr 20, 2017 at 10:09