Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!