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

257
Visualizações
Next.js Full DOM Refresh Every Page Load

We are considering Next.js for a web site we're building where the primary concern is performance. The site must be able to run ads, however, and this specific ad network's API requires a full DOM refresh on each page load.

Initially, we began to build the site with Gatsby, then we learned that the ad API didn't play nicely with JavaScript UI frameworks. We're now considering whether Next.js might be more appropriate with its greater flexibility and features perhaps specifically helpful in our use case. (Our ad script is injected in the head between script tags, and Next gives us some control with next/script.)

My question here is essentially twofold:

First, is the above possible? Second, would it negate any performance benefits of using Next.js in the first place?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Maybe you can just reInit the ad script on each page load ?

Consider using a service like GTM to manage scripts.

Then you can fire events on each router change in your app, intercept theses events in GTM and trigger actions (script init or add a new instance) directly in GTM.

about 4 years ago · Juan Pablo Isaza Relatório
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