What is the best practice to detect small screens with flask ? Is there an alternative of using a JS script doing the job and then communicating it via a route to flask ?
The server does not know anything about the window the browser is running in. You will need to use javascript.