there is not, but the idea is not to "detect" whether it's mobile or not, but to tell user agents that this site is available for mobile on "...", using `<link rel="alternate" media="handheld" href="...">`, with the href point to a (new) route that app.js supports, serving content specifically for handheld devices. You will see sites like youtube.com do mobile redirects in the same way: the user's browser gets to decide what it should to, the site simply serve contents based on requests, rather than guessing what the user "should have wanted"