13
Views
6
Comments
Solved
How to detect IE browser
Question
Application Type
Reactive

How can I detect IE browser? I want to redirect user to another site when he use IE browser.

mvp_badge
MVP
Rank: #0
Solution

Hi Vinay,

As reported, I also had the same observation. For the same use-case, I found one more alternate implementation which you could use.

Run this sample app | DetectBrowser

Solution Reference: https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser

Refer to the attached .oml file.


Hope this helps you!


Kind regards,

Benjith Sam

RWALabGetBrowser.oml

Rank: #3807

Thanks Benjith, above solution working fine for me.

mvp_badge
MVP
Rank: #0

You're welcome, Vinay.

Glad to help you :)


Kind regards,

Benjith Sam

mvp_badge
MVP
Rank: #0

Hi Vinay,

For the mentioned use-case, you can use the GetBroswer Client Function/action referencing from the OutSystemsUI module as shown below.

Go To Manage Dependencies > OutSystemsUI > GetBrowser

Expression value

GetBrowser(GetUserAgent())

For UserAgent value you can use the GetUserAgent() built-in function.


For server-side check, you can refer the GetUserAgent server action from the HTTPRequestHandler module as shown below

Refer this link:  GetUserAgent


You can also refer to the below-mentioned post as well: 

https://stackoverflow.com/questions/19999388/check-if-user-is-using-ie

https://www.outsystems.com/forums/discussion/18848/how-does-one-determine-the-current-browser-the-user-uses/


Hope this helps you!


Kind regards,

Benjith Sam

mvp_badge
MVP
Rank: #0

Hi Vinay,

One more info related to the previous comment which I want to mention i.e. Under the hood the GetBrowser() function does have a slight glitch in its implementation.

Refer to this post: https://www.outsystems.com/forums/discussion/64249/how-to-make-reactive-web-outsystemsui-device-detection-work/#Post252193


Solution:  In order to make the GetBrowser() work you will have to Wrap the GetUserAgent() within the ToLower() function as shown below

GetBrowser(ToLower(GetUserAgent()))


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #3807

Hi Benjith,

Function GetBrowser(ToLower(GetUserAgent())) working fine for chrome. When I am using IE, function returns blank value. For IE, what value above function returns so that same I can use in condition.


Thanks

Vinay Sonawane

mvp_badge
MVP
Rank: #0
Solution

Hi Vinay,

As reported, I also had the same observation. For the same use-case, I found one more alternate implementation which you could use.

Run this sample app | DetectBrowser

Solution Reference: https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser

Refer to the attached .oml file.


Hope this helps you!


Kind regards,

Benjith Sam

RWALabGetBrowser.oml

Rank: #3807

Thanks Benjith, above solution working fine for me.

mvp_badge
MVP
Rank: #0

You're welcome, Vinay.

Glad to help you :)


Kind regards,

Benjith Sam