title: JavaScript as a "service" on phones
body: <p>I am putting together project plan and have come across a silly question.</p>
  
  <p>For right now, the plan is for the project to be a web only app. Meaning I am not planning on making native clients. Someday possibly.</p>
  
  <p>I want to know the feasibility of using JS on a web page as a "service" so to speak. If the user logs in and the JS starts up, how long will it be allowed to run if the user changes to a different app or turns their screen off?</p>
  
  <p>I have done some testing but I can not confirm what I am seeing on the web. I am hoping to do that here.</p>
  
  <p>Test: Join jabbR.net. Leave browser. turn screen off.</p>
  
  <p>iOS: User got disco'ed after 15ish mins. <br/>
  Android: User still connected after 40ish mins <br/>
  WinPhone: No idea, don't have access to one</p>
  
  <p>What I assume happens is the OS will suspend the browser as some point in time. I am just looking for what the criteria is for an app to be suspended or if the app will keep it self open because it is doing something (unlikely).</p>
  
  <p>NOTE: I know a native service would be best case here. The reason I am asking is I am seeing if ideas I have for the app are feasible with the browser only. </p>