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

293
Visualizações
In Next.js how can I fetch static assets without passing cookies in the request header?

In next.js when static assets are being fetched from the browser, cookies are being sent in the request. This is unnecessary and carries overhead.

Is there any way this can be avoided?

https://imgur.com/a/UggKmd0

Please check the screenshots to understand why I want to do this.

any help is appreciated.

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

0

Cookies are sent if they match the host and the path.

So change either the URL of the resource or the URL the cookie is value for so they no longer match.

For example, you might move the resources to a different URL (e.g. have www.example.com and static.example.com) or change the path of the cookie (e.g. so it only applies to www.example.com/api/).


That said, the overhead of cookies is minimal and this probably isn't worth the effort.

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