Define "inactive" Is it not browsing from the page, or not doing anything at all (eg moving the mouse) Where do you want to detect this? On the browser, or on the server?
On the server side of things, you can't tell anything except the last time the user made a request. The browser could be closed, or it could just be sitting there unused. There is no way to tell from the server side. Thats the whole point of a session timeout.
Yes, in server session state. But with client or dbase state it is dead. I think it is better to consider it dead once the browser closes. Sure the resources are still there, but without the session ID you're out of luck.