Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
nextjs 404 page loading optimization

I have a next.js project where I use the default 404 page. But If I go to the network tab of the browser I can see a lot of things loading for this 404 page.

enter image description here

My _document.tsx file is like this

  <Html className="html" color-theme="default">
                <Head>
                    <meta name="app-version" content={process.env.NEXT_PUBLIC_APP_VERSION} />
                    <link rel="shortcut icon" href="/favicon.ico" />
                    <script
                        crossOrigin="anonymous"
                        src="https://polyfill.io/v3/polyfill.min.js?features=Intl.PluralRules%2CIntl.Locale%2CIntl.PluralRules.~locale.en%2CIntl.PluralRules.~locale.sv%2CResizeObserver%2CObject.fromEntries"
                    ></script>
                </Head>
                <body>
                    <Main />
                    <NextScript />
                </body>
            </Html>

So the favicon and the polyfill.min.js loading make sense but I am not sure why other files loading for this simple 404 page. especially CSS files and font files.

Then I created a brand new project and try to load the 404 page still I can see a bunch of script files loading. Why is this happening in nextjs? Is there a way to load a minimum of 404 page with just only HTML and css? enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!