The preload in the response header does not always work, which types of relationship are reliable in the HTTP header?

📅 2026-10-11 👁️ 18

Resource prefetching should be written into the page tag or the HTTP response header, the answer to which relationships are reliable and effective is not the same. The semantic difference between the two layers is often confused. The response header is parsed before the main content of the document is delivered, the timing is earlier, but the types of relationships it supports are fewer. According to MDN's description of the Link header, in practice, most rel link types put into the HTTP header do not take effect, and the truly reliable ones are the preconnection and preload types. To determine which hints to give to the response header, it is necessary to first clarify the differences between the two layers.

The division of labor between the Link header and the page tag is different.

The link tag within the page is read by the HTML parser, in addition to pre-fetching hints, it can also handle style sheet associations, icon declarations, and other functions;The Link response header only specifies link relationships at the document level and does not take over the behavior of these tags themselves. syntactically, they are also different: each link value in the response header must enclose the URI in angle brackets, followed by rel and other parameters, and non-ASCII characters in the URI must be percent-encoded first; otherwise, the entire header field may be ignored directly.The benefit is that it is injected by the server or edge node, without changing the HTML template, and is effective consistently for all requests to the same document.

Most rel added to the response header does not take effect

Pre-fetch class, module preloading class, style sheet class, these common relationships in the tag, often cannot get the expected processing after being added to the response header. The table is layered by reliability.

Rel type Is it reliable to put it in the response header Description
Preconnect Reliable Complete domain resolution and connection establishment in advance, directly benefiting cross-origin resources
Preload Reliable Preferably initiate the request for specified resources, and specify the as and cross-origin attributes
Prefetch unreliable speculative download for the next navigation, the header form is often ignored
modulepreload unreliable semantic dependency module graph, usually only valid when declared within the document
stylesheet Not applicable only the tag form takes on the responsibility of style application, the header declaration does not equal to take effect
dns-prefetch unreliable covered by preconnect, the header form lacks stable support

only combined with 103 Early Hints can have an earlier window

The value of the Link header lies in its timeliness, but the extent of its timeliness depends on when it is sent out. If the server can issue the 103 Early Hints status code before the response is fully assembled and include the preconnect and preload Link headers in this batch of information, the browser can start establishing connections and fetching resources during the time it is waiting for the body, and some requests will already be completed by the time the formal response arrives. This level of cooperation requires the support of both the web server and the upstream program, and if any hop drops it, the effect degrades to a normal response header.

What should be taken in advance on the homepage of the content station and how to check it

Resources that are worth putting in the response header have two characteristics: cross-origin and not on the initial HTML reference chain. Font files used on the first screen, critical styles injected dynamically by scripts, and avatars and album entry points from independent static domains are typical objects;The images and main stylesheet already written in the page, the browser will find it out itself, redundant prefetching will only increase unnecessary requests. Which layer should provide the resources depends on the production method of static files: the path is determined during the build phase, it is easier to maintain and audit if written into the template tags.The path is determined at runtime based on the visitor, language, or compression strategy, which is more convenient to inject into the response header and also avoids conditional branches in the template.

The method of verification should fall on observable evidence. First, capture a real response and confirm whether the URI in the header field contains angle brackets, whether it is completed with percentage encoding, and whether 'as' and 'crossorigin' are present; then, look at the reason for initiating the request in the browser's network panel, and only when there are marks related to preloading or early hints does it mean that this prompt has been truly consumed. Finally, do a round of comparison, and test the three arrangements of writing tags, writing response headers, and combining both several times on the same page, taking the distribution instead of single-point values to avoid taking sporadic cache hits as optimization effects.

Common questions

Ask: Why is the prefetch in the response header not working, and what usually goes wrong?

First, check three points: whether the relationship type is within a reliable range, whether the URI is enclosed in angle brackets and encoded with percent signs, and whether the cross-origin resource is supplemented with 'as' and 'crossorigin'. If any of these are missing, the browser may ignore the entire item.

Ask: Since the response header is stronger, should all the prefetches in the tag be moved over?

It is not recommended to take a one-size-fits-all approach. Relationships that depend on the semantics of the tag, such as stylesheet associations and icon declarations, should stay on the page. The response header should only handle preconnection and preloading, with each layer performing its duties more stably.

Ask: Does the Link header still have meaning if 103 Early Hints is not used?

Yes, but the window of opportunity has become smaller. The hints can only be read after the text arrives or the first block of the response, and the time saved mainly falls on the connection establishment stage, and the improvement for cross-origin resources is still visible.

Ask: How can you determine whether a hint is worth keeping?

Answer: Conduct a separate closed-loop test for it, observe whether the start time of the resource and the first screen rendering metrics degrade. Hints that do not show any distinguishable changes after being turned off are redundant and should be cleaned up.

Related articles

Cross-domain isolation requires setting two response headers at the same time, why third-party images and scripts suddenly do not load

To enable cross-origin isolation, you need to set two response headers at the same time, one to control which cross-origin resources the local document can access, and one to manage the window reference relationships. After setting it to require explicit permission, if third-party images and scripts in the page do not carry the cross-origin mark, they will fail to load. The troubleshooting should consider both the source marker and the release of the resource itself.

2026-10-11

An interface method that can carry hundreds of password combinations in a single request, why can't it prevent login failure lock?

In the early legacy remote procedure call interface, there is a batch method that can pack hundreds of username-password combinations into a minimal number of HTTP requests, making the login lock based on the number of failures ineffective; the same mechanism can also be used for amplification attacks. Whether to retain such entries and at what level to intercept is an inevitable judgment when the interface is closed.

2026-10-11

After reviewing dozens of generative optimization studies, it is said that changing the engine technique is not valid, how can the site's practice prove itself

A review of research covering the years 2023 to 2026 reviewed dozens of optimization experiments for generative engines, concluding that thematic relevance and contextual position are the most reproducible, general techniques are difficult to migrate to different engines, and no technique has been proven to have stable, long-term, cross-platform effects. The content site needs to use is to replace others' conclusions with self-site comparative verification.

2026-10-11

The AI gateway makes web search into an interface to provide externally, and the content retrieved by the model is more than a list of whose.

When web search is made into an interface on the gateway, the content being retrieved goes through an additional checklist on the gateway side. Cloudflare connected the search capability to the AI gateway at the beginning of October 2026 and required the results to include the source address of the content retrieved. For content sites, discoverability is no longer solely determined by search engine crawling, and the site description file and crawling exclusion rules need to be in place in the chain.

2026-10-11

In addition to the severity score, there is also a score predicting the probability of a vulnerability being exploited, how to use it.

The severity rating answers how great the impact is, and another type of score answers the probability of this vulnerability being actually exploited in the future. EPSS provides probability and percentile for each publicly disclosed vulnerability every day, and the official recommendation is to consider it along with the severity rating and the list of in-the-wild exploitation to prioritize the handling queue.

2026-10-11

The mechanism of notifying search engines of new links in real time, which companies are currently on the support list.

In addition to submitting the sitemap, there is also a type of immediate notification mechanism that directly informs participating engines of new, updated, or deleted links. The list of supported engines is based on the official website, and engines outside the list still follow their own channels. For Chinese sites, the sitemap is responsible for full-scale, and active push is responsible for incremental, getting new links to the correct engines as soon as possible is more practical than repeated submission.

2026-10-11

There is a paper that points out that optimization of generative methods brings two types of risks, and where content stations should self-check for two places.

A paper with a stand reminds us that the risk of generative engine optimization lies on the side of the engine rather than the content side: on one hand, visibility is more likely to concentrate on a few sources, and on the other hand, the potential commercial impact that may be mixed into evidence and reasoning may not be disclosed. The two aspects that the site can self-check are: who is speaking for your page, and whether there are any unexplained impact sources in the answers.

2026-10-11

Statistics show that about 70% of websites use PHP, PHP 8 accounts for about 65% of them, how to use these two numbers.

W3Techs statistics on October 11, 2026 show that 69.7% of known server-side language websites use PHP, and 64.6% of PHP users are already on version 8. This article explains the scope and reading of these two numbers, and provides a framework for comparing web building solutions from four aspects: ecosystem, operating cost, deployment form, and upgrade burden, to avoid taking the deployment proportion directly as a technical conclusion.

2026-10-11