View Single Post
  #17  
Old June 30th 16, 05:46 AM posted to alt.windows7.general
Jannah Jankowski
external usenet poster
 
Posts: 11
Default Why does Firefox not respect the HOSTS file in Windows

On Wed, 29 Jun 2016 18:02:41 -0400, Mayayana wrote:

| 10. I just recently learned of Firefox DNS prefetching:
| So I turned it off, changing network.dns.disablePrefetch;true to |
network.dns.disablePrefetch;false |

I hadn't noticed that one. The default seems to be
true, which seems to make sense. Why do DNS lookups for sites you might
not visit?


You must be correct.

I was going crazy turning stuff from true to false, but this is one that
is probably best left at false if we're trying to eliminate Firefox going
to domains that we didn't explicitly state.

So I'll change it back to the default!

BTW, with regard to the whole "DNS caching thing" I am not the expert, so
I can only conjecture how I think it works.

1. You type www.somewhere.com along with http (i.e., port 80)
2. Firefox checks the Firefox DNS cache, but it's not there
3. Firefox checks the Windows DNS cache, but it's not there
4. So Windows first checks the HOSTS file, but it's not there
5. Then Windows checks the Windows DNS cache, but it's not there
6. So Windows checks what the DNS server is
7. For me, that's gonna be set to the router 192.168.1.1
8. So Windows asks 192.168.1.1 who the DNS Server is
9. The router returns the Google DNS Server 8.8.8.8
10. So Windows sends a port 53? DNS request to 8.8.8.8
11. (It actually follows a hierarchy so let's simplify here.)
12. 8.8.8.8 returns the IP address 1.2.3.4 to the DNS cache
13. 1.2.3.4 is handed back to to Windows from 8.8.8.8
14. Windows puts www.somewhere.com=1.2.3.4 into the Windows DNS cache
15. Windows hands Firefox that information
16. Firefox puts www.somewhere.com=1.2.3.4 into the Firefox DNS cache
17. Firefox sends the port 80 request to 1.2.3.4
18. And 1.2.3.4 returns the information to Firefox

Upon the *next* invocation of the same URL...
1. You type www.somewhere.com along with http (i.e., port 80)
2. Firefox checks the Firefox DNS cache, and finds 1.2.3.4
17. Firefox sends the port 80 request to 1.2.3.4
18. And 1.2.3.4 returns the information to Firefox

That's how I *think* it goes.
The Firefox cache skips steps 3 to 16 above.

However, the whole firefox cache thing is confusing.
So this is just a guess.

I throw it out there for someone who actually knows what they're talking
about to clarify.

Ads