PHP auto logout after session timout on mobile devices -


i sure has run across issue before, haven't been able find on anywhere. anyway here scenario.

i have php website user login, account id set session variable, once in acts single page app. session account id tracking activities different things throughout app.

the site accessed on mobile devices. have php sets session timeout length, using js, gives them popup warning couple minutes before timeout ends. after end of timeout, using meta refresh, redirects them login page.

on desktop, works supposed to. on mobile, behaving differently. on mobile device, user may login, stuff on page, without logging out, put phone in pocket , not come couple hours. when open browser keeps them on page on, js not running during time phone sleeping, or whatever else doing in interim. meta refresh not work expected, session still timed out. when open app up, , try stuff, getting errors in db saying id cannot empty.

i can use ajax check if session still exists on every click of button, speed of app prefer not that.

has else ran , found solution automatically logging out people on single page apps viewed on mobile device?


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -