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

190
Vistas
How resource heavy is sending an AJAX request on a setTimeout() function?

I'm going to create a live chat system for my website, but I'm not sure how to go about it. My original plan was to have an AJAX request to get the chat log every X seconds, and that's what it seems a lot of tutorials have done.

However, I'm worried that by doing this, I might use up my server's resources unnecessarily, or very quickly. I want my chat to be quite accurate, so I guess my question is, what's the most appropriate time in milliseconds I should wait between each ping to not use up my server's resources while keeping my chat log accurate?

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

0

If you want something powerfull, try to look into websockets. You can find some intuitive libraries like socket.io.

Otherwise it's ok to use ajax on a setTimeout and do some research about ajax polling wich is the best technology to use in that case.

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