Context:
- We have a cordova application loading an online website. (We basically use cordova for the plugins)
- We store a cookie using
$cookies.put()
- It works fine in desktop browsers and on iOS (as long we use expiration on the cookie)
Problem:
On Android if the user kill the application with 30 seconds after $cookies.put()
is called the cookie will be gone on the next reboot.
If the user wait more than 30 seconds (like 35 seconds or more) everything works fine.
Question:
How can we force the cookie to be saved instantly (or at least much faster)?
Notes:
- Adding options on the cookie does not change anything
- I tried to replace the system browser with crosswalk using cordova-plugin-crosswalk-webview but it does the same thing