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

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

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 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