Computer version vs Mobile version

I have just deployed an app with a map containing tooltips (a kind of popup that appears when you move your mouse over it). It works a little differently when you go to it from a smartphone. In this case, I can put another option than tooltips, which is more adapted.

My question: is it possible to know whether a user accesses the app via a computer or a smartphone, so as to direct them to the best version?

You could use something like GitHub - aghasemi/streamlit_js_eval: A custom Streamlit component to evaluate arbitrary Javascript expressions to detect the screen size, or get the user agent and then use that to determine if it’s mobile or desktop – here are some helpful suggestions once you are using javascript javascript - Detecting a mobile browser - Stack Overflow

I will try this
Thank you blackary!

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