Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

One unused Stripe script in the Next.js root layout meant our public pages did contact another domain—even though we had said nothing on the landing page did. The script loaded Stripe’s pricing-table code on every page, including pages that did not use a pricing table. It did not set cookies in the author’s reported checks, but it still made a cross-origin request and disclosed the visitor’s IP address and user agent to Stripe. The mistake was not evidence of a cookie violation; it was a mismatch between what the site’s source code suggested and what the deployed site actually requested.

What did the root layout load?

The line was a Next.js Script component near the end of app/layout.tsx:

<Script src="https://js.stripe.com/v3/pricing-table.js" strategy="lazyOnload" />

Because it was in the root layout, the script applied across the site rather than only on a particular pricing page. The site had used an embedded Stripe pricing table in an earlier experiment, then replaced that component with custom pricing cards so plans could be shown in each visitor’s currency. The embedded table went away; its script tag did not.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That distinction matters. A page can have no visible third-party widget and still load code from another origin. Here, the script did not visibly break the site, which made the leftover line easy to miss. Its presence was a network behavior, not proof that a Stripe pricing table appeared to visitors or that Stripe was being used as an analytics tracker.

Popular on Amazon
Silkland 40Gbps USB C 90 Degree Right Angle Adapter 2 Pack, 240W USB4 | Male to Female Extender, 8K@60Hz, Thunderbolt 4/3, Steam Deck, ROG Ally, MacBook, Switch 2, iPhone 18/17/16/15, Quest 3 VR
  • 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
  • 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
  • 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
  • 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
  • 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.

Why did one line contradict the site’s claim?

The statement that nothing on the landing page talked to another domain was a statement about requests made by the deployed page. The root-layout script made that statement false: the page fetched a resource from js.stripe.com, outside the site’s own origin.

In the author’s reported 2026 browser observations, the homepage produced 47 same-origin resource entries and one Stripe resource entry. The pricing page produced 42 same-origin entries and one Stripe entry. These are observations of those pages, not general web statistics or independent benchmark results.

A request does not need to be visible in the page to count. Nor does it need to set a cookie. When a browser requests a resource from another origin, that origin receives network information that includes the visitor’s IP address and user agent. So the engineering claim about cross-origin requests was inaccurate even though the cookie check was empty.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does lazyOnload remove a request?

No. In this case, lazyOnload deferred loading; it did not remove the script or make the request same-origin. As the author put it, “lazyOnload is a politeness, not a removal.”

Also popular on Amazon
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Deferral can make a script less prominent in a quick inspection: it may load after the page’s initial work rather than alongside the first visible content. That changes when the request occurs, not whether the code is part of the page. If a check runs before a deferred resource has loaded, the request may not yet appear in the entries collected at that moment. A useful inspection therefore needs to account for delayed loading rather than treating an early empty result as proof that no request will happen.

This is not an argument that deferred scripts are inherently harmful. A page may need a script and choose to load it later. The relevant questions are whether the feature is still needed, what the request entails, and whether the site’s public claims match the behavior visitors receive.

How can I check cross-origin requests on my site?

Use the browser’s resource timing entries on the deployed page, then group the recorded resource URLs by origin. The author used this browser-console expression:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Object.entries(performance.getEntriesByType("resource").reduce((acc, r) => { const origin = new URL(r.name).origin; acc[origin] = (acc[origin] || 0) + 1; return acc }, {}))

The result is a list of origins and the number of resource entries associated with each. For a site with a single expected origin, a second origin is a prompt to investigate; it is not, by itself, a verdict about whether the request is necessary or problematic.

Also popular on Amazon
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  1. Open the deployed page. Use the actual production URL, not only a local development server or a source-code search. The claim at issue concerns what visitors’ browsers load.
  2. Open the browser’s developer tools and select the Console. Run the expression after the page has had time to load deferred resources. Repeat it on the homepage and on other page types whose behavior matters.
  3. Read the origins, not just the totals. Identify each origin that is not the site’s own. A count tells you that resources were recorded; the origin tells you where the browser requested them.
  4. Trace unexpected origins to their resources. In the Network panel, inspect the resource URL and its initiator to help locate the code that caused the request. Then search the application for the relevant hostname, filename, or component.
  5. Decide whether the feature is still used. A request may support a real feature, or it may be a leftover. Confirm the component is present and needed before removing its loader.
  6. Recheck after a production deployment. Repeat the inspection on the live page. A source change is not evidence that production behavior changed until the deployed page reflects it.

Resource entries are a snapshot of what the inspected page recorded during that visit, not a guarantee about every route, browser state, or future interaction. A page may make a request only after a delay or a user action, so inspect relevant page types and repeat the check when a feature can load later. The count also does not explain a request’s purpose; use the resource URL and initiator to investigate it.

How can I tell whether a script in a Next.js root layout is unused?

Check both the codebase and the page’s rendered behavior. A script reference in app/layout.tsx has broad reach, but finding its tag alone does not establish that it is safe to delete: first determine whether any page actually uses the feature it enables.

Search for the feature, not just the script URL

In this incident, a repository search for pricing-table returned exactly one hit: the script tag. The Stripe script registered the stripe-pricing-table custom element, but the element was absent from the DOM and unused anywhere on the site. Together, those checks supported treating the script as stale rather than moving it to a different page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For another script, search for its custom element, component, initialization code, and any relevant configuration as well as the URL. A script may be loaded indirectly or a feature may be created dynamically, so a single text search is a useful lead, not a complete proof. Check the rendered page and relevant routes before removing the loader.

Also popular on Amazon
BENFEI USB C Hub 5-in-1 with 4K HDMI(Certified), 100W Power Delivery, 3 USB-A, Silicone Cable, Aluminum Case Compatible with MacBook Pro/Air, iPad Pro, iMac, iPhone 15 Pro/Pro Max, XPS, Thinkpad
  • Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
  • Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
  • 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
  • 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
  • Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.

Remove the loader when no page needs the feature

The proposed correction here was to delete the unused script line. Moving it elsewhere would preserve an unnecessary request: no page used the custom element. The concise version of the fix was, “One deletion, and the tag moves nowhere.”

After deletion, the production check matters. If the same external origin still appears, another code path may be requesting it, or the changed version may not yet be deployed. If the feature was actually needed, restore an intentional loader at the narrowest scope that serves that feature rather than leaving it in the root layout by default.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Does an empty cookie check mean there was no privacy disclosure?

No. In the author’s reported checks, document.cookie and localStorage were empty on both inspected pages, and the public-page script reportedly set no cookies. Those observations address browser storage; they do not erase the fact that a request to another origin sends network information to that origin.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The site’s checkout policy already disclosed that Stripe might set necessary checkout cookies under Stripe’s own privacy policy. That checkout disclosure and the public-page request are distinct facts: one concerns possible checkout cookies, while the other concerns an external resource loaded on public pages.

Also popular on Amazon
𝟒𝐏𝐚𝐜𝐤 𝐔𝐩𝐠𝐫𝐚𝐝𝐞𝐝 USB to USB C Adapter,Type-C Female to A Male Charger Converter for iPhone 18 Charger,iWatch Ultra SE 9 10,iPhone 17 Pro Max 16 15 14,Samsung S25,AirPods,iPad,Car,Xbox
  • 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
  • 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
  • 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
  • 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
  • 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.

This account does not establish that every external request requires a consent banner, or make a legal determination about this implementation. It shows why “no cookie was set” and “no third-party request occurred” cannot be used as interchangeable claims. Cookie behavior and network disclosure should be checked and described separately.

What should teams change in their release checks?

Make external requests an observable part of the production review, especially when a site makes a specific claim about what its pages do. A code review can catch an obvious external URL, but the deployed browser view can catch behavior introduced by shared layouts, delayed scripts, or code that is not obvious from a page’s visible content.

  • Check necessity: tie each external script to a feature that still exists, rather than assuming an old integration is harmless because it is quiet.
  • Check disclosure cost: identify which origin receives the request and what information necessarily accompanies a browser request, separately from cookie behavior.
  • Check production against assumptions: compare resource origins on the live page with the claims made about it, and repeat the check after a fix ships.

At the time the author described the proposed deletion, it had not yet shipped; the tag was deliberately left in place so readers could reproduce the live behavior. The production status after that point is not established here. The lasting lesson is narrower and more useful than blaming a vendor: a deferred script can remain an active request, and a claim about requests belongs to the deployed site, not just to a developer’s mental model of the source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does an empty localStorage prove a page does not track visitors?

No. It only tells you that no values were present in that storage area in the inspected browser context. It does not establish what a server can learn from a network request or what other storage mechanisms may be used.

Can a browser report that a third-party request happened without proving what data the vendor retained?

Yes. Resource entries show a browser-side request, not the recipient’s retention practices or subsequent processing. Those questions require separate evidence, such as the recipient’s published privacy information.

Why might the same page show different resource counts on separate visits?

Counts can vary with page state, timing, browser behavior, or interactions that trigger additional resources. Treat a count as an observation of a particular visit, and focus on identifying unexpected origins rather than comparing totals in isolation.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of December 6, 2026 10:01 am GMT.