How do I detect mobile devices in blazor server side application?
问题 I need to detect if the user of my blazor server side application is using a mobile device. Is there any way to find out which device the user is using? I know I can do it with a JSRuntime but is there any way to figure it out with pure C#? 回答1: I did find this article that will read you the width and height of a window in Blazor. Looks like it uses JS Interop. With that, you can determine if a user is using a mobile based on the width of their resolution. Of course, it's not 100% full proof