Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

294
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda