I'm specifying certain domains in my hosts file to block them. So redirecting a domain to 127.0.0.1 when i'm not running any web server on 127.0.0.1 will block that domain.
why does it take chrome two minutes to pick up that a domain has been blocked in the hosts file, and can that time be decreased a lot?
If I go to rice.com then it loads. (I used rice.com just as a test)
I then tried these lines in my hosts file to block the website from loading
127.0.0.1 rice.com
127.0.0.1 www.rice.com
Immediately after saving the hosts file, I go to rice.com in chrome, and it still loads.
But if once rice.com has loaded, I leave it for two minutes, as it is, then I try to reload it, then it says "rice.com refused to connect." So chrome finally picks up that the domain is blocked.
If I then edit the hosts file to unblock that domain, by commenting those lines, then chrome picks up immediately that it has been unblocked and goes there. So, for unblocking chrome is very responsive. (understandable, since if chrome can't load it I imagine it does everything to try to load it and part of that is checking the hosts file).
I tested this on Windows 7 and on Windows 10, same thing. (Apart from one of my tests on Windows 10 where it responded immediately picking up on a block. But other than that one time, Windows 10 seems to take a while to pick it up, but picked it up after 2 minutes, as Windows 7 does).
I have tried ipconfig /flushdns but I haven't noticed it making any difference
I'm wondering if there is any setting related to that two-minute delay and any way to decrease it?
Note- Somebody commented asking re Firefox. I tested on Firefox and firefox is worse. I had rice.com blocked in the hosts file and firefox saw that. Then I unblocked it. Chrome picks up immediately that it's unblocked, but firefox even after two minutes hadn't figured it out. Firefox took 4 minutes to notice that rice.com was unblocoked while chrome notices immediately. As for the other way, so, once a site loads, then the site is blocked, how long it takes chrome to realise is 2 minutes. How long it firefox to realise, well i've given firefox over 4 minutes before a refresh and it still hasn't figured it out