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

135
Vistas
Server process continues after Browser tab is closed

I have an ASPX page which when is submitted into a new tab starts a server side process. Sometimes the process takes too long and a user closes the tab the page is running in. However, the process continues running and that creates a big problem. My question is why the process continues running and how can I kill it when the tab is closed. I do have a code in the code behind where I can kill the process, I just can't find a way of executing it. Please, help. Release is coming. Closing Browser actually help.

Thanks

code to detect tab closing event:

window.addEventListener('beforeunload', function (e) {
            e.preventDefault(); 
            e.returnValue = '';
            ... execute server code
        });

The event is not detected.

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

0

If you have a way to cancel the process on the back-end, the best you can do is use the JavaScript events onunload and onbeforeunload to detect when the user closes a tab, and then send a request to kill the process.

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