Cursors are expensive resources.
Generally...
Open them just when you need them.
Close them as soon as you are done with them.
Cursor-per-thread may tie up resources needlessly. Sometimes you have so much database activity that cursor-per-thread might be higher performance. This is rare. If you think that cursor open-close is slowing things down you need to measure the difference between per-function and per-thread to see what's really going on.
The server has no idea what is going on in the browser. Zero. Each request from the browser is a separate, unique, disconnected event.
If the browser "closes", that doesn't mean anything. It only means that the server doesn't get any further requests.
If the server was trying to download a response, then the socket crashes and the server eventually stops trying.
If the server wasn't processing anything, it's still not processing anything.