I know there are answers regarding this, but it doesn't encompass some of the edge cases. I have to ensure to make a HTTP request before a user leaves a page. There are a couple of ways for users to do this:
- Closing the tab
- Clicking on an external link
- Closing the browser
- Shutting down the computer(for whatever reason, power outage, etc)
Any reliable way to do this? Any work arounds? Doesn't need to be javascript but any slick/hacky ways to accomplish this? I guess I can make intervals to run to make requests time to time to at least capture some data, but any other thoughts?