Open In App

HTTP headers | X-DNS-Prefetch-Control

The X-DNS-Prefetch-Control is an HTTP response type header that informs the browser whether DNS prefetch to be executed or not. Turning it on may not work as many browsers may not support it in all the situations. Turning it off should disable in all supported browsers. Most of the browsers will ignore this header as they don’t do DNS prefetching.

File objects like style sheets, images, JavaScript, etc are pre-fetched in the background. Pre-fetching is done in the background as it is possible that the DNS will be handled by the time the specified items are needed or the user clicks a URL, this reduces latency.



Syntax:

Directives: This header accepts two directives as mentioned above and described below:



Examples:

Note: DNS requests are very small in terms of bandwidth, but latency can be very high for mobile networks.

Supported Browsers: The browsers supported by X-DNS-Prefetch-Control header are listed below:

Article Tags :