Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
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 answers
Answer question

0

Try using blur event

 $( window ).blur(function() {
  alert("This page has lost its focus.");
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!