Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

114
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda