Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I block page autorefresh in Google Chrome?

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?

like image 765
G M Avatar asked Sep 05 '25 14:09

G M


1 Answers

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.

like image 61
Konrad Dzwinel Avatar answered Sep 11 '25 04:09

Konrad Dzwinel