作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想停止 Google Chrome 中的自动刷新页面,因为这是一个非常烦人且消耗内存的问题,而且我无法使用开发人员工具。我正在尝试使用 Chrome 的开发人员工具从脚本中删除 refresh 和 setTimeout 函数,但没有结果。我怎样才能从控制台阻止这个烦人的功能一段时间?
最佳答案
自 <meta http-equiv="Refresh" content="300; URL=?refresh_ce">
使用 DevTools 删除是不够的(它不会阻止页面刷新)我已经在控制台中执行了这段代码:window.onbeforeunload = function(){ return 'Reload?';}
. onbeforeunload
事件将在页面重新加载之前触发,您将能够选择中止重新加载。根据我的测试,对话框只出现一次。
关于google-chrome - 如何在 Google Chrome 中阻止页面自动刷新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18273767/
我是一名优秀的程序员,十分优秀!