1107
Views
3
Comments
Check if user is on Mobile or Tablet or Computer browser
Question

Hi all,

Is there a function or plugin that can check whether the end user is viewing my web application on Mobile / Tablet / Desktop handily?

2021-10-17 12-36-16
Amreen Shaikh

Hi OS Dev3,

IsPhone() and IsTablet().

These are function u can use.


Regards,

Amreen

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

Hi there,

You could also use the following functions from OutsystemsUIWeb module.

Regards,

Nordin

2019-09-20 10-25-35
Mario Andrade

There's an "issue" I found with these functions is that they can be triggered by changing the browser size.

So if a developer needs to ensure something only shows if the user is not on a desktop environment, and the user is not simulating a mobile or tablet environment, just simple resized the window to have more desktop space, not sure if those will do the trick.

For that case you can use the GetUserAgent() function and check if it matches for mobile devices.There's a similar thread on Browser Detection.

You can also search online for a Javascript function that detects mobile browsers and implement it on your code.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.