How can I detect that my a website/PWA has been loaded into the foreground?

I have a Progressive Web App for Ipad written in React, and I’d like to detect when a user reloads the app after switching to another. Is there a browser event or serrvice worker event I can subscribe to for when the app is reloaded?

Along a similar thread, is there a way to tell that a progressive web app has been force closed and reopened?


38 thoughts on “How can I detect that my a website/PWA has been loaded into the foreground?”

  1. hey there and thank you for your information – I’ve certainly picked up something new from right here.
    I did however expertise several technical issues using
    this site, as I experienced to reload the website many times
    previous to I could get it to load properly. I had been wondering if your web hosting is OK?

    Not that I’m complaining, but slow loading instances times will sometimes affect your
    placement in google and can damage your high quality score
    if advertising and marketing with Adwords. Well I’m adding this RSS to my e-mail
    and can look out for a lot more of your respective intriguing content.
    Ensure that you update this again soon.


Leave a Comment