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

147
Vistas
How to save data when user move away from the web page on mobile devices?

I am creating an HTML web app and getting all data from API calls. This mostly works on mobile devices(IOS/Android). There are some pages that users can navigate these pages(every page has a previous/next button). I wanted to save page data when the user tries to move away from the webpage(tab close/minimize the browser/ swipe between apps). This app focuses on mobile devices and needs to save data when users move away from the web page. I tried onunload, onbeforeunload method but these are not fired. I used ajax calls to save data with an API. What is the best way to fix this problem?

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

0

Try using blur event

 $( window ).blur(function() {
  alert("This page has lost its focus.");
});
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