Urgent.News

What's breaking now, across thousands of outlets.

Tech

Our preload header downloads four files the page never uses, and one query parameter is why

CogniPrep's homepage shows a grid of company logos. The first four are above the fold, so next.config.mjs sends a preload hint in a response header, which is the earliest possible moment to start those downloads: before the browser has parsed a single byte of HTML. { source : ' / ' , headers : [ { key : ' Link ' , value : [ ' </logos/hsbc.svg>; rel=preload; as=image ' , ' </logos/barclays.svg>;…

CogniPrep's homepage displays a grid of company logos, with the first four positioned above the fold. During the page load, a preload hint is included in the response header, initiating downloads before the browser parses any HTML. However, this header results in four unnecessary file downloads that the page later disregards. This issue was discovered by opening the Network tab to capture a screenshot for another post.

The waterfall shows each logo being fetched twice, six milliseconds apart, with identical byte counts. The preloaded versions lack a query string, while the actual page requests do not include them. The query parameter "?dpl=dpl_26dq..." is generated by Vercel, a deployment ID, to prevent clients with older builds from mixing assets with newer ones.

Despite being a beneficial feature, this query parameter is applied to all static asset URLs, including those emitted by the framework, but not the Link header generated manually in next.config.mjs. As preload hints are matched by URL, query strings cause duplicate requests, as the browser perceives /logos/hsbc.svg and /logos/hsbc.svg?dpl=dpl_26dq... as separate resources.

This discrepancy occurs when asset URLs are rewritten between the configuration and markup, such as through content hashes, CDN cache-busting parameters, or image optimisers. The warning message indicates that the preloaded resource was never used within a few seconds of the window's load event. The console displays this warning four times, emphasizing the need to ensure intentional preloading with appropriate "as" values.

The preload warning arises when the URL the preload is written for does not match the URL requested by the page. In this case, the framework correctly generates preload links for eager images, while the Link header includes the deployment ID, making it redundant and causing extra duplicate requests. Deleting the preload or modifying the deployment ID to match the framework's approach is the remedy.

The fix involves deleting the header and relying on the eager or priority props on the images to manage asset URLs, streamlining the process and eliminating duplicate requests.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Route Risky Signups Automatically With n8n

A signup fraud check in n8n often comes down to one IF node: if is_vpn is true, block. It runs, it looks reasonable on the canvas, and it still gets the decision wrong in both directions.

2,404,811 answers on port 2181 and 1,381,208 on port 9092: the difference between a coordinator and a broker

2,404,811 answers on port 2181 and 1,381,208 on port 9092: the difference between a coordinator and a broker The counts Two ports associated with distributed data infrastructure appeared at very…

  • ZooKeeper coordination port 2181 queried 2,404,811 times in September 2026
  • Kafka broker port 9092 registered 1,381,208 results, with 73,000 confirmed Kafka traffic
  • Lack of authentication on both ZooKeeper and Kafka exposes services to unauthorized access

Cloud Security Assessment

Cloud Security Assessment Cloud environments have changed the way businesses build, store, and deliver applications. But moving workloads to AWS, Microsoft Azure, Google Cloud, or a combination of…

More from Monday 28 September →