You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are network.dns.disablePrefetch/network.dns.disablePrefetchFromHTTPS master switches of dom.prefetch_dns_for_anchor_http_document/dom.prefetch_dns_for_anchor_https_document?
#1870
Closed
Jee-Hex opened this issue
Jul 8, 2024
· 2 comments
Open a new tab and open the Network Monitor beforehand.
Visit https://en.wikipedia.org/wiki/Main_Page. AFAICT the page do not request any resources from meta.wikimedia.org yet contains <link rel="dns-prefetch" href="//meta.wikimedia.org" /> in its source, so that's what we will be watching out for.
Stop HTTP logging.
Open about:networking#dns to confirm any resolved hostnames.
Check the Network Monitor to see if any resources were requested from these hostnames.
Check the HTTP logs for entries like D/nsHostResolver Resolving Host [meta.wikimedia.org]<^partitionKey=%28https%2Cwikipedia%2Corg%29> type 0. [this=blahblahblah]
Using a vanilla 127.0.2 (i.e. dom.prefetch_dns_for_anchor_https_document= false, network.dns.disablePrefetchFromHTTPS= false):
I see DNS lookups for `meta.wikimedia.org` (Expected Behavior).
with dom.prefetch_dns_for_anchor_https_document= true, network.dns.disablePrefetchFromHTTPS= false:
In addition to `meta.wikimedia.org`, I also see DNS lookups for other Wikipedia editions (e.g. `ja.wikipedia.org`) (Expected Behavior).
with dom.prefetch_dns_for_anchor_https_document= true, network.dns.disablePrefetchFromHTTPS= true:
No DNS lookups for `meta.wikimedia.org` or other Wikipedia editions (Expected if `network.dns.disablePrefetchFromHTTPS` is the master switch for `dom.prefetch_dns_for_anchor_https_document`).
with dom.prefetch_dns_for_anchor_http_document= true, dom.prefetch_dns_for_anchor_https_document= true, network.dns.disablePrefetch= true, and network.dns.disablePrefetchFromHTTPS= false:
No DNS lookups for `meta.wikimedia.org` or other Wikipedia editions!
with dom.prefetch_dns_for_anchor_http_document= false, dom.prefetch_dns_for_anchor_https_document= true, network.dns.disablePrefetch= false, and network.dns.disablePrefetchFromHTTPS= false:
DNS lookups for `meta.wikimedia.org` and other Wikipedia editions (Expected Behavior).
with dom.prefetch_dns_for_anchor_http_document= false, dom.prefetch_dns_for_anchor_https_document= true, network.dns.disablePrefetch= true, and network.dns.disablePrefetchFromHTTPS= false:
No DNS lookups for `meta.wikimedia.org` or other Wikipedia editions!
with dom.prefetch_dns_for_anchor_http_document= false, dom.prefetch_dns_for_anchor_https_document= false, network.dns.disablePrefetch= true, and network.dns.disablePrefetchFromHTTPS= true:
No DNS lookups for `meta.wikimedia.org` or other Wikipedia editions (Expected Behavior).
Am I missing something or is there a bug somewhere?
The text was updated successfully, but these errors were encountered:
The answer is yes, because network.dns.disablePrefetch is also the master switch of network.dns.disablePrefetchfromHTTPS. I guess I always thought it meant something like network.dns.disablePrefetchfromHTTP.
In short
network.dns.disablePrefetchfromHTTPS is the master switch of dom.prefetch_dns_for_anchor_https_document,
network.dns.disablePrefetch is (presumably) the master switch of dom.prefetch_dns_for_anchor_http_document,
network.dns.disablePrefetch is also the master switch of network.dns.disablePrefetchfromHTTPS.
@mik0l commented in #1862 (comment)
So I used the following test case (inspired by bug 1596935 comment 28):
https://en.wikipedia.org/wiki/Main_Page
. AFAICT the page do not request any resources frommeta.wikimedia.org
yet contains<link rel="dns-prefetch" href="//meta.wikimedia.org" />
in its source, so that's what we will be watching out for.about:networking#dns
to confirm any resolved hostnames.D/nsHostResolver Resolving Host [meta.wikimedia.org]<^partitionKey=%28https%2Cwikipedia%2Corg%29> type 0. [this=blahblahblah]
Using a vanilla 127.0.2 (i.e.
dom.prefetch_dns_for_anchor_https_document
= false,network.dns.disablePrefetchFromHTTPS
= false):with
dom.prefetch_dns_for_anchor_https_document
= true,network.dns.disablePrefetchFromHTTPS
= false:with
dom.prefetch_dns_for_anchor_https_document
= true,network.dns.disablePrefetchFromHTTPS
= true:with
dom.prefetch_dns_for_anchor_http_document
= true,dom.prefetch_dns_for_anchor_https_document
= true,network.dns.disablePrefetch
= true, andnetwork.dns.disablePrefetchFromHTTPS
= false:with
dom.prefetch_dns_for_anchor_http_document
= false,dom.prefetch_dns_for_anchor_https_document
= true,network.dns.disablePrefetch
= false, andnetwork.dns.disablePrefetchFromHTTPS
= false:with
dom.prefetch_dns_for_anchor_http_document
= false,dom.prefetch_dns_for_anchor_https_document
= true,network.dns.disablePrefetch
= true, andnetwork.dns.disablePrefetchFromHTTPS
= false:with
dom.prefetch_dns_for_anchor_http_document
= false,dom.prefetch_dns_for_anchor_https_document
= false,network.dns.disablePrefetch
= true, andnetwork.dns.disablePrefetchFromHTTPS
= true:Am I missing something or is there a bug somewhere?
The text was updated successfully, but these errors were encountered: