Search code examples
session-statemobile-websiteibm-mobilefirst

MobileFirst: Mobile Web - Page refresh to keep session alive


I am developing a MobileFirst based Mobile-Web app using Angularjs. In case, a user refreshes the page then all files get reloaded again as per standard browser behavior. This causes the user session invalid, how should we handle this ? disabling the refresh button is not good option.

Environment:

  • MobileFirst v7.0
  • Angularjs 1.4.3
  • any browser

Solution

  • The Mobile Web environment has support for cache manifest, which allows caching files so that even though you reload/refresh the web app it will know to not reload all resources from the server. You can attempt implementing it to see if it alleviates your issue.

    See more here: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.dev.doc/devref/c_optimizing_apps_appcache_procedure.html?lang=en