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

361
Views
location.reload not updating page on remote server as it does locally

I am trying to reload the page after a POST request is complete with this line:

window.location.reload();

On my local machine this is updating the content on the page, meanwhile on my remote server where I use Nginx I have to force refresh the page.

I tried:

window.location = window.location
window.location.href = window.location.href
window.location.reload(true);
//reloading with a setTimeout function
//turning off the cache in nginx
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your browser may be caching certain remote files (CSS, JS) by default. You could configure Nginx to always check for a new file if exists. 304 Not Modified is returned if file is not changed or 200 OK is returned with the new file.

## Force browser to check for new JS & CSS files
location ~ .(css|js)$ {
  add_header Cache-Control no-cache;
  etag on;
}

Also, browsers' reloading behavior can be affected if DevTools is open. Chrome provides the "Disable Cache" option for forcing new requests

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