From b1a889421c425c8cfa48c7a47c4e0a56e4e59ec3 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 12 Sep 2024 19:56:09 +0100 Subject: [PATCH] dns prefetch --- src/app/layout.tsx | 2 ++ src/components/preload-resources.tsx | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/components/preload-resources.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f4447a0..297f786 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,3 +1,4 @@ +import { PreloadResources } from "@/components/preload-resources"; import type { Metadata } from "next"; import localFont from "next/font/local"; import BackgroundImage from "../components/background-image"; @@ -62,6 +63,7 @@ export default function RootLayout({ + diff --git a/src/components/preload-resources.tsx b/src/components/preload-resources.tsx new file mode 100644 index 0000000..7fb5e5b --- /dev/null +++ b/src/components/preload-resources.tsx @@ -0,0 +1,9 @@ +"use client"; + +import ReactDOM from "react-dom"; + +export function PreloadResources() { + ReactDOM.prefetchDNS("https://proxy.fascinated.cc"); + ReactDOM.prefetchDNS("https://scoresber.com"); + return undefined; +}