禁用Chrome超时自动重新加载错误 [英] Disable Chrome Auto Reload on Time Out Error

查看:163
本文介绍了禁用Chrome超时自动重新加载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名Web开发人员,经常运行脚本来修复由于服务器或浏览器设置而可能超时的问题.过去,Chrome会一直旋转直到脚本完成为止所花费的时间-即使需要一个小时,但他们改变了一切,现在,它强加了自己的截止时间,因为服务器的响应速度不够快在服务器继续执行脚本的同时.

I'm a web developer, and often run scripts to fix things that might time out due to server or browser settings. In the past, Chrome would just spin and spin as long as it takes until the script was done - even if it takes an hour, but they changed things and now, it imposes its own cutoff time is the server doesn't respond fast enough while the server continues to execute the script.

现在,这很烦人,它迫使我将事件记录到文件中,而不仅仅是转储到屏幕上,但是最糟糕的是Chrome认为在超时后尝试重新连接到URL是个好主意.然后开始执行可能已经再次运行的相同脚本.

Now, this is annoying, it forces me to log events to a file, rather than just dump to the screen, but the worst part is Chrome thinks it is a great idea to try reconnecting to the URL after it times out. That then starts to execute the same script which probably is already running again.

这里的问题是,我经常创建脚本以一次运行一次,并且再也不会运行一次,如果该脚本运行不止一次,它可能会完全破坏一切.

The issue here is that I often create scripts to run ONCE and never again, and if the script is run more than once, it could completely destroy things.

说我创建了一个脚本,以删除一百万行数据库中每个字段的前4个字符.通过Chrome运行脚本最终将超时,然后它将再次运行该脚本几次,而不会告知您.突然,已经减少的数据再次被减少,破坏了数据.

Say I create a script to remove the first 4 characters from each field in a 1 million row database. Running the script via Chrome would eventually time out and then it would run the script again several times without letting you know. Suddenly, the data that was already reduced is being reduced again, destroying the data.

这是一个严重的问题,以前从来都不是问题,因为Chrome不会自动尝试重新加载未能加载的页面.因此,我正在寻找一种禁用此新功能并阻止Chrome在页面加载失败后自动重新加载的方法.它显示一个错误页面,显示单击此处重新加载",但它完全忽略了用户,并决定是否单击它来重新加载.

This is a serious concern that was never an issue before because Chrome wouldn't automatically try to reload a page that failed to load. So, I'm looking for a way to disable this new feature and stop Chrome from automatically reloading on a failed page load. It displays an error page saying "Click here to reload", but it completely ignores the user and decides to reload whether you click it or not.

我只是运行了一个脚本,以将文件从EC2实例复制到S3存储桶,作为一些清理工作的一部分,但我从日志中看到它实际上在关闭选项卡之前已经运行了4次-即使我从未要求过重新加载.这意味着它将相同的文件复制了4次.幸运的是,在这种情况下,由于它覆盖了现有文件,因此浪费了S3访问权限.

I just ran a script to copy files from an EC2 instance to an S3 bucket as part of some cleanup, but I see from the logs that it actually ran 4 times before I closed the tab - even though I never asked it to reload. That meant it copied these same files 4 times. Fortunately, in this case, it just wasted S3 access, since it overwrote the existing files.

是的,我意识到,有很多方法可以防止脚本多次执行,从运行到执行后立即重命名文件都可以.问题是速度.这些修补程序脚本并非旨在成为具有所有功能的完整应用程序,而应是一种快速应用修补程序的方法.我希望对Chrome进行更改,以禁用其新的工作方式,以便我可以像过去一样继续工作10年以上.

Yes, I realize that there are many ways of preventing the script from running more than once, from flock to renaming the file immediately after executing it. The issue is speed. These fix scripts are not intended to be full blown applications complete with all the bells and whistles, they are meant to be a fast way to apply a fix. I would rather make a change in Chrome to disable the new way it works so that I can continue to work as I have for over 10 years.

这是指自动重新加载,我之所以不称其为刷新",是因为该页面从来没有首先加载过.这与数以百万计的有关刷新的问题无关,而这正是我尝试查找此问题时得到的全部信息.

This is referring to an auto reload, and I'm not calling it a "refresh" because the page never loaded in the first place. This has nothing to do with the millions of questions regarding refreshes, and that is all I get when trying to search this problem out.

推荐答案

可能可以解决此问题:

  1. 转到chrome://flags/
  2. 设置为Disabled标志Enable Offline Auto-Reload Mode(或Offline Auto-Reload Mode)
  3. 设置为Disabled标志Only Auto-Reload Visible Tabs
  4. 重新启动浏览器
  1. go to chrome://flags/
  2. set to Disabled flag Enable Offline Auto-Reload Mode (or Offline Auto-Reload Mode)
  3. set to Disabled flag Only Auto-Reload Visible Tabs
  4. Relaunch browser

现在我的页面出现错误ERR_CONNECTION_RESET,该页面不再自动重新加载

Now I have page with error ERR_CONNECTION_RESET that does not reload itself automatically anymore

这篇关于禁用Chrome超时自动重新加载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆