Closed perrycate closed 4 years ago
https://stackoverflow.com/questions/13443503/run-javascript-code-on-window-close-or-page-refresh is nice. If we delete it then (as opposed to when the connection is established) then the data would get cleaned up whether a connection was actually made or not.
I wouldn't be surprised if there are circumstances when said cleanup code doesn't run (browser crashes, internet disconnects, whatever), but if it usually runs, that's good enough for me. It's not like we're storing a ton of data, if I need to clean it up manually once every couple of months (until I get lazy and make some better solution), so be it.
Fixed (for now) by 078c783bfc1779f3e5be91e20f4451712edcac4c
A nice way to reduce db usage without having to do it manually.