var
pageFresh
=
getCookie(
"pagefresh");
if (
pageFresh
!=
"ok") {
document.
cookie
=
'pagefresh=ok';
location.
reload(
true);
// 强制获取cookie从服务器取数据
}
//方法刷新
function
getCookie(
name) {
var
arr
=
document.
cookie.
match(
new
RegExp(
"(^| )"
+
name
+
"=([^;]*)(;|$)"));
if (
arr
!=
null)
return
unescape(
arr[
2]);
return
null;
}
最后
以上就是悦耳小霸王最近收集整理的关于获取cookie强制刷新页面的js方法的全部内容,更多相关获取cookie强制刷新页面内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复