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

227
Vistas
Check with JavaScript if server side log file has been modified?

In the same directory on the server as the html page I have a log that comes from an application. I want to check this file exists and the size or modified date of this file.

This needs to be in a simple JavaScript function that looks for the file and confirms it exists and the size or time modified of the file.

This is so I can update or reload my html page if there is new data. The data itself is being transformed via xslt. Is there something like this I can do:

function checkForLog() {
  let logFile = new File([""],"./report.log");
  let size = logFile.size;

  if (size > previousSize){
    location.reload(true);
  }    
}

I tried this but it returns 0 even though the file report.log is 56kb so it seems this logFile is a new file instance and not actually a reference to my file in the directory.

about 4 years ago · Santiago Trujillo
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