title: Javascript event for mobile browser re-launch or device wake
body: <p>Morning all, I'm looking for some kind of Javascript event I can use to detect when a mobile browser window regains focus, after either a user closes/minimizes their browser (to go back to a home screen/different app), or if the device resumes from sleep (either the user powering it off, or it going to sleep after a screen timeout).</p>
  
  <p>I'd like to be able to find a single event that works for everything, but I know that's unlikely! The <code>pageshow</code> event works for iOS devices, but it's rather sketchy for use with everything else. I've tried <code>focus</code> and <code>DOMActivate</code> but neither of them seem to have the desired effect.</p>
  
  <p>The page may not always have form elements on it, and I don't really want the user to have to touch the page again to trigger the event. </p>
  
  <p>The requirement for such an event is caused by our code periodically checking for new content by making XHR requests. These are never sent when the browser is asleep, so we never get new content to restart the timeouts.</p>
  
  <p>Thanks for any help you guys may be able to provide!</p>