5 ms·
Some systems lock records while users are viewing them, so it can be helpful to send a request that unlocks the record when the user leaves the page.
by daveoc64 5y ago
Some systems lock records while users are viewing them, so it can be helpful to send a request that unlocks the record when the user leaves the page.
- XCSme 5y agoDoing resource-locking client-side authoritative sounds like a security issue.
- maccard 5y agoWhat if they just close their laptop lid, or the browser crashes? You can't reliably detect when a user leaves with this method, so you _cant_ use it for anything critical
- unilynx 5y agosure you can, if you combine it with a timeout and/or a way for users to break a lock (and then of course, blocking the original user's session if he comes back anyway) at least you don't have to wait for the timeout to expire if the user properly closed the application/website, which happens most of the time