gpt4 book ai didi

google-chrome - 如何在 Google Chrome 中阻止页面自动刷新?

转载 作者:行者123 更新时间:2023-12-03 11:04:55 29 4
gpt4 key购买 nike

我想停止 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/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com