Skip to content

Commit

Permalink
✨ 请求页面添加时间戳, 防止缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaojun1998 committed Jul 18, 2019
1 parent 80cacf0 commit e943479
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<div class="layui-side-scroll">
<ul class="layui-nav layui-nav-tree" lay-filter="lay-nav" lay-accordion="true">
<li class="layui-nav-item layui-this">
<a lay-url="welcome" lay-id="home">
<a data-th-lay-url="@{/welcome(timestamp=${new java.util.Date().getTime()})}" lay-id="home">
<i class="layui-icon layui-icon-home"></i>&emsp;<cite>首页</cite>
</a>
</li>
Expand Down Expand Up @@ -104,12 +104,12 @@
<div class="layui-icon admin-tabs-control layui-icon-refresh-3" lay-event="refresh"></div>
<div class="layui-tab" lay-unauto lay-allowclose="true" lay-filter="lay-tab">
<ul class="layui-tab-title">
<li lay-id="home" lay-url="welcome" class="layui-this"><i
<li lay-id="home" data-th-lay-url="@{/welcome(timestamp=${new java.util.Date().getTime()})}" class="layui-this"><i
class="layui-icon layui-icon-home"></i></li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<iframe src="welcome" class="layui-iframe"></iframe>
<iframe th:src="@{/welcome(timestamp=${new java.util.Date().getTime()})}" class="layui-iframe"></iframe>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
var loop = setInterval(function() {
if(winObj.closed) {
clearInterval(loop);
window.location.href = "/main";
window.location.href = '/main?=timestap'+ new Date().getTime();
}
}, 1000);
}
Expand Down Expand Up @@ -102,7 +102,7 @@
icon: 1,
time: 1000
}, function () {
location.href = 'main';
location.href = '/main?=timestap'+ new Date().getTime();
});
}
</script>
Expand Down

0 comments on commit e943479

Please sign in to comment.