首页 > 技术文章 > 关于浏览器缓冲

liangxin 2017-05-04 16:18 原文

参考连接: http://blog.csdn.net/jasondu264/article/details/20876765

(1) 每次主页面刷新时随机更换iframe的name;

(2) 每次主页面刷新时在iframe的src路径页面赋予一个随机get参数,例如:

<iframe src="http://www.example.com/thepage.html" name="aframe"></iframe>
<script type="text/JavaScript">
    document.frames['aframe'].location.href += (document.frames['aframe'].location.href.indexOf("?") != -1 ? "?" : "&") + (new Date()).getTime();
</script>

推荐阅读