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

152
Vistas
can i use a javascirpt to reload webpage with two conditions

I want to reload the webpage with confirm form resubmission and only if these two conditions:

  • the web page is completely loaded and the document title still affaching = 504 Gateway Time-out

so I need a script for that: waiting for the page until it is completely loaded, after that the document title still = 504 Gateway Time-out the reload the page with confirm form resubmission

if (document.title == '504 Gateway Time-out' && "document.readyState === "complete"") {setTimeout(function() {window.location.reload(true);},} i have this script but i dont know if it work correctly

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This should get you started.

The following can be used to ensure the page document has fully loaded.

document.addEventListener("DOMContentLoaded", function() { your code here }

docs: https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event

From here you can put your if statement into this function checking the document title and doing what you want to do.

i have this script but i dont know if it work correctly

Have you tested your code to see if it works correctly? Use the console in the developer tool for any javascript errors? Console logging if needed for debugging?

Good luck and hope this helps. If it does please mark that ^ arrow and ✅

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