I’m working on a web app for web os which should support background mode. We need to send several HTTP requests when app goes to background.
I subscribed to visibilitychange event and check when document.hidden is true. It works okay.
But I see that in some cases (probably when the app does its background job too long) my HTTP requests don’t send until I go back to foreground state or requests can stuck in some “Pending” state as Chrome dev tools say.
I saw the similar problem on Tizen and it was necessary to set a special flag in app manifest to allow the app to work in background fully, but I don’t see any flag like this for Web OS.
Does anyone know something about this problem and how to solve this?