<html manifest="IGNORE.manifest">
以上設(shè)置需要網(wǎng)頁(yè)刷新一次才能生效,下面代碼可以實(shí)現(xiàn)打開強(qiáng)制刷新
if(!window.name){
var str = Math.random().toString(36).substr(2);//隨機(jī)字符串
var S = getQueryString('S')
window.name = 'isreload';
if (S) {
window.location.href = window.location.href.replace(/^([^&]*)\?([^&]*)&?S=([^&]+)(\S*)$/, function(match,$1,$2,$3){
return match.replace($3, str)
})
}else{
if(window.location.search.indexOf('?') > -1){
window.location.search += 'S=' + str;
}else{
window.location.search = 'S=' + str;
}
}
}else{
window.name = ''
}
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
}