How to Access the Referring URL in a Streamlit Application?

In a Dash application, I’ve been using request.referrer from the Flask library to obtain the referring URL of the request, i.e., the URL of the page from which the user navigated. I’m looking to achieve the same functionality within a Streamlit application.

Is there a method, library, or a workaround in Streamlit that offers a similar capability to access the referring URL? Any guidance or examples on how to accomplish this would be greatly appreciated.

Thank you!

Hi @Jefferson_Camillo

This is an interesting use case. Perhaps, you can look into the st.experimental_get_query_params() method that allows retrieval of the query parameters from the URL.

More info in the Docs page:

1 Like