> But to improve this I can use the BrowserSniffer to execute the code only in desktop.

If the app works as expected on mobile I wouldn't bother doing that.