亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Guides Access control CORS Authentication Browser detection using the user agent Caching Caching FAQ Compression Conditional requests Connection management in HTTP 1.x Content negotiation Content negotiation: List of default Accept values Cookies CSP Messages Overview Protocol upgrade mechanism Proxy servers and tunneling Proxy servers and tunneling: Proxy Auto-Configuration (PAC) file Public Key Pinning Range requests Redirections Resources and specifications Resources and URIs Response codes Server-Side Access Control Session Guides: Basics Basics of HTTP Choosing between www and non-www URLs Data URIs Evolution of HTTP Identifying resources on the Web MIME Types MIME types: Complete list of MIME types CSP Content-Security-Policy Content-Security-Policy-Report-Only CSP: base-uri CSP: block-all-mixed-content CSP: child-src CSP: connect-src CSP: default-src CSP: font-src CSP: form-action CSP: frame-ancestors CSP: frame-src CSP: img-src CSP: manifest-src CSP: media-src CSP: object-src CSP: plugin-types CSP: referrer CSP: report-uri CSP: require-sri-for CSP: sandbox CSP: script-src CSP: style-src CSP: upgrade-insecure-requests CSP: worker-src Headers Accept Accept-Charset Accept-Encoding Accept-Language Accept-Ranges Access-Control-Allow-Credentials Access-Control-Allow-Headers Access-Control-Allow-Methods Access-Control-Allow-Origin Access-Control-Expose-Headers Access-Control-Max-Age Access-Control-Request-Headers Access-Control-Request-Method Age Allow Authorization Cache-Control Connection Content-Disposition Content-Encoding Content-Language Content-Length Content-Location Content-Range Content-Type Cookie Cookie2 Date DNT ETag Expect Expires Forwarded From Headers Host If-Match If-Modified-Since If-None-Match If-Range If-Unmodified-Since Keep-Alive Large-Allocation Last-Modified Location Origin Pragma Proxy-Authenticate Proxy-Authorization Public-Key-Pins Public-Key-Pins-Report-Only Range Referer Referrer-Policy Retry-After Server Set-Cookie Set-Cookie2 SourceMap Strict-Transport-Security TE Tk Trailer Transfer-Encoding Upgrade-Insecure-Requests User-Agent User-Agent: Firefox Vary Via Warning WWW-Authenticate X-Content-Type-Options X-DNS-Prefetch-Control X-Forwarded-For X-Forwarded-Host X-Forwarded-Proto X-Frame-Options X-XSS-Protection Methods CONNECT DELETE GET HEAD Methods OPTIONS PATCH POST PUT Status 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 307 Temporary Redirect 308 Permanent Redirect 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 428 Precondition Required 429 Too Many Requests 431 Request Header Fields Too Large 451 Unavailable For Legal Reasons 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported 511 Network Authentication Required Status
characters

X-DNS-Prefetch-ControlHTTP 響應(yīng)頭控制 DNS 預(yù)取功能通過對(duì)用戶可以選擇跟隨,以及通過在文檔,包括圖片,CSS,JavaScript 和等參考項(xiàng)的 URL 都鏈接瀏覽器主動(dòng)進(jìn)行域名解析。

該預(yù)取在后臺(tái)執(zhí)行,以便在需要引用項(xiàng)目時(shí) DNS 可能已經(jīng)解決。這可以減少用戶點(diǎn)擊鏈接時(shí)的等待時(shí)間。

Header type

Response header

Forbidden header name

no

句法

X-DNS-Prefetch-Control: on
X-DNS-Prefetch-Control: off

指令

onEnables DNS 預(yù)取。這是瀏覽器所做的,如果它們支持該功能的話,那么這個(gè)標(biāo)題不是 presentoffDisables 的 DNS 預(yù)取。如果您不控制頁面上的鏈接,或者不知道您不希望將信息泄漏到這些域,這很有用。

描述

DNS 請(qǐng)求在帶寬方面非常小,但延遲非常高,特別是在移動(dòng)網(wǎng)絡(luò)上。通過推測性地預(yù)取 DNS 結(jié)果,可以在某些時(shí)候顯著降低延遲,例如當(dāng)用戶點(diǎn)擊鏈接時(shí)。在某些情況下,延遲可能會(huì)縮短一秒。

在一些瀏覽器中實(shí)現(xiàn)這種預(yù)取允許域名解析與實(shí)際頁面內(nèi)容的獲取并行(而不是與其串行)發(fā)生。通過這樣做,高延遲域名解析過程在獲取內(nèi)容時(shí)不會(huì)造成任何延遲。

頁面加載時(shí)間 - 尤其是在移動(dòng)網(wǎng)絡(luò)上 - 可以通過這種方式進(jìn)行可測量的改進(jìn)。如果可以在請(qǐng)求的圖像之前解析圖像的域名,那么載入很多圖像的頁面在加載圖像時(shí)可以看到 5% 或更多的改進(jìn)。

在瀏覽器中配置預(yù)取

一般來說,您不需要執(zhí)行任何操作來管理預(yù)取。但是,用戶可能希望禁用預(yù)取。在 Firefox 上,這可以通過設(shè)置network.dns.disablePrefetch首選項(xiàng)來完成true

另外,默認(rèn)情況下,不會(huì)對(duì)通過 HTTPS 加載的文檔執(zhí)行預(yù)取嵌入式鏈接主機(jī)名。在 Firefox 上,可以通過設(shè)置network.dns.disablePrefetchFromHTTPS首選項(xiàng)來更改false

例子

打開和關(guān)閉預(yù)取

您可以X-DNS-Prefetch-Control使用元素http-equiv上的屬性來發(fā)送頭部服務(wù)器端或單個(gè)文檔<meta>,如下所示:

<meta http-equiv="x-dns-prefetch-control" content="off">

您可以通過設(shè)置content為“ on” 來反轉(zhuǎn)此設(shè)置。

強(qiáng)制查找特定主機(jī)名

您可以強(qiáng)制特定的主機(jī)名的查找,而不提供使用主機(jī)名通過使用特定的錨rel上的屬性<link>與元素鏈接類型的dns-prefetch

<link rel="dns-prefetch" href="http://www.spreadfirefox.com/">

在這個(gè)例子中,域名 “ www.spreadfirefox.com ” 將被預(yù)先解決。

同樣,鏈接元素可用于解析主機(jī)名而不提供完整的 URL,但只能通過在主機(jī)名前面加兩個(gè)斜線來解析:

<link rel="dns-prefetch" href="//www.spreadfirefox.com">

強(qiáng)制預(yù)取主機(jī)名可能很有用,例如,在網(wǎng)站的主頁上強(qiáng)制預(yù)先解析在整個(gè)網(wǎng)站中經(jīng)常被引用的域名,即使它們沒有在主頁上使用。即使主頁的性能可能不會(huì)受到影響,這也會(huì)改善網(wǎng)站的整體性能。

Previous article: Next article: