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

166
Vistas
Browser Downloading Last GET Request Instead of Reloading

I'm mildly new to front end and back end development but I need help with a weird browser problem.

I have made a website but whenever I close out of its tab then do "CTRL-SHFT-T" (open last tab), the browser downloads the last GET request instead of loading a page.

I already know how to use history.pushState() and the popstate event listener, so I don't believe either of those are the problems, but I recognize they could be.

This is a big problem because my website is set up with an index.html file that is just the head, header, and footer, then every time the user navigates to another page, it sends a GET request for its respective HTML file an populates it in between the header and footer. (It stores the html in a js object once the GET request is fulfilled so then if the user navigates back to the same page, it's already stored so it doesn't need to request again)

I have done a little research on it there are very few people who have experienced this problem and it seems to have something to do with the "Cache-Control" headers. I don't believe I had this problem until I used helmet(), although I am unsure because when I turn it off it still happens. Should I manually set every CSP and not use helmet, should I use it and seek a solution by changing these headers, or am I way off track and am deep in the XY Problem?

My website's server is run on express.js and hosted on heroku.

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