Currently, I am in need of a solution that allows me to unlock a deal when the tab is closed. The challenge lies in the fact that the lock status is stored in my database, and I must make a POST request upon tab closure to change the status of the deal to unlocked. Utilizing "beforeunload" has proven to be quite unreliable as reported by others who have encountered similar issues (it completely fails in my case). I am looking for alternative methods to implement this API call. My technology stack includes Angular, C# ASP.NetCore, and SQL.
I attempted to use beforeunload with no success; hence, triggering the API call on tab close remains unresolved.