Given the following jsFiddle, which is a simple incrementing counter
....if I visit the url above using a mobile device (smartphone or tablet for the sake of argument), the counter starts incrementing as you'd expect provided there is JavaScript support, then it appears that if I press the "Home" button, or click the power button once to turn off the screen (but keep the phone powered on) then the script will stop running and the counter stops incrementing. This I expect to happen and I appreciate the reasons why as reserving battery life is hugely important on a mobile device, so it makes sense that the UI thread sleeps, or similar. Once you revisit the browser, the counter continues incrementing. In the real world, websites that determine timeout period using JavaScript would not timeout despite the inactivity period, I am assuming.
I am also assuming that this will vary by device, by firmware, by software even - what I'm trying to ascertain here is whether there's a standard approach or default behaviour built into mobile development frameworks for this and any form of consistency in how the devices behave.
I'm not totally sure I've asked a good question here, but I've struggled to find 100% relevant information from SO, or I don't quite know what the question is I need to ask when searching.