Is there a way to call the function when the user leaves the web page?

Currently, I want to call a function when a user leaves a web page.

This function has database delete fucntion.

  • When one user is accessing: Function not executed
  • When the last remaining user leaves the web page: Run the function

However, I cannot find a way to use the feature in streamlit. Is there any solution

Or is there a way around?

I also hope to have such a feature.

1 Like

Hi @aza1200

This sounds like a feature request, perhaps you’d like to open a GitHub issue here:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.