I would like to stop autorefresh page in Google Chrome, because it is a very annoying and memory consuming issue and I can't work with the developers tools. I'm trying to delete the refresh and setTimeout function from the script using Chrome's developers tools but I have no results. How can I block this annoying feature even for a while from the console?
Asked
Active
Viewed 4.6k times
27
-
What page are you talking about? You should probably search for `window.location` in the code. – Konrad Dzwinel Aug 16 '13 at 13:13
-
It does after five minutes even in incognito. If you look at the script console: http-equiv content="300; URL=?refresh_ce". Thanks however. – G M Aug 16 '13 at 15:24
2 Answers
64
Since <meta http-equiv="Refresh" content="300; URL=?refresh_ce">
removal using DevTools is not sufficient (it doesn't stop page from refreshing) I've executed this code in the console:
window.onbeforeunload = function(){ return 'Reload?';}
. onbeforeunload
event will fire before page reload and you'll be able to choose to abort reloading. From what I've tested the dialog shows up only once.

Konrad Dzwinel
- 36,825
- 12
- 98
- 105
-
2For the NY Times, I often keep a tab open to the front page. With your method, the dialog isn't limited to a one-time display, but continues to show up every time I return to that tab after a sufficient (albeit relatively short) period of time. But a quick click on "Stay on this Page" is far better than an annoying reload. (I change "Reload?" to "Annoying reload?" or something even more satisfying.) Thanks for the blood pressure medicine. – RJH Apr 12 '16 at 17:39
6
You can simply disable feature of page auto refresh, by following steps:
- Open chrome browser tab
- Type in your address bar
chrome://flags
- Search
#automatic-tab-discarding
and make it 'Disabled' from 'Default' - Restart your browser
- you are done !

Ankit K Gupta
- 534
- 6
- 6
-
3This option isnt present in Chrome 57. (It's not clear to me how Automatic Tab Discarding prevents refresh anyway, which is why I went looking...) – T.J. Crowder Apr 19 '17 at 06:34
-
Looks like the OP was asking about the web page reloading itself as if the user had pressed F5, and this answer is about Chrome un-loading tabs from memory, but anyway it may be useful to some – golimar Oct 29 '19 at 13:19