# How can i get the browser name in perspective?

**URL:** <https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651>\
**Category:** Ignition\
**Created:** [May 12, 2021, 9:54pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651 "2021-05-12T21:54:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wzhigan](https://avatars.discourse-cdn.com/v4/letter/w/e95f7d/32.png) [@wzhigan](https://forum.inductiveautomation.com/u/wzhigan)\
**Post date:** [May 12, 2021, 9:54pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/1 "2021-05-12T21:54:55Z")

</div>

I notice the graphic loading is much faster in Chrome based browser than others like Firefox.  
want to get the browser info, if it is not Chrome, will hide some chart to increase the loading time(initial)

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [May 12, 2021, 10:50pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/2 "2021-05-12T22:50:19Z")

</div>

Session props would be your best bet

```auto
session.props.device.userAgent

```

though the userAgent has been somewhat muddled by browser makers

here’s what my Firefox looks like

```auto
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0

```

and here is my Chrome one

```auto
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

```

further reading [https://towardsdatascience.com/the-user-agent-that-crazy-string-underpinning-a-bunch-of-analytics-86507ef632f0](https://towardsdatascience.com/the-user-agent-that-crazy-string-underpinning-a-bunch-of-analytics-86507ef632f0)

---

<div class="post-metadata">

**Author:** ![hjoao16661](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hjoao16661/32/82319_2.png) [@hjoao16661](https://forum.inductiveautomation.com/u/hjoao16661)\
**Post date:** [December 23, 2025, 12:25pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/3 "2025-12-23T12:25:21Z")

</div>

Can i just get the O.S. part of this tag?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 23, 2025, 1:15pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/4 "2025-12-23T13:15:57Z")

</div>

I would parse it with a regular expression. What have you tried?

---

<div class="post-metadata">

**Author:** ![hjoao16661](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hjoao16661/32/82319_2.png) [@hjoao16661](https://forum.inductiveautomation.com/u/hjoao16661)\
**Post date:** [December 23, 2025, 1:27pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/5 "2025-12-23T13:27:41Z")

</div>

> [@pturmel](#):
>
> tried?

I’m thinking about an script that I saw, but it doesn’t work. (Get.os)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 23, 2025, 1:30pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/6 "2025-12-23T13:30:49Z")

</div>

A Perspective script that tries to get this information **anywhere** else will get the OS of the gateway, not the client browser. Parse the session property.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 23, 2025, 1:37pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/7 "2025-12-23T13:37:00Z")

</div>

Depending on how much of it you want, I'd do a split and lookup in a custom session property  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3aa433cc8161032232d9a3fd14663e92b8b50612.png)

data  
`split({this.props.device.userAgent}, '[(|;|)]')`

platform  
`{this.custom.userAgent.data}[1,0]`

OS  
`{this.custom.userAgent.data}[2,0]`

---

<div class="post-metadata">

**Author:** ![hjoao16661](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hjoao16661/32/82319_2.png) [@hjoao16661](https://forum.inductiveautomation.com/u/hjoao16661)\
**Post date:** [December 26, 2025, 1:21pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/8 "2025-12-26T13:21:39Z")

</div>

> [@JordanCClark](#):
>
> split({this.props.device.userAgent}, '[(|;|)]')

Sry for any Grammatical Issues in my english, i’m still learning…

More simple than just seems like, i tried the function form, in the binding expression, i just used a script that works like a filter to return the str(system):

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/0/005c90347f86fbd13897407261da5912379017e2.png)

OBS.: After copying the print here, i added some others conditions in the script what filters other O.S.

What do you guys think at all? For me,it worked.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 26, 2025, 3:30pm UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-browser-name-in-perspective/46651/9 "2025-12-26T15:30:26Z")

</div>

Scripts and transforms are terribly inefficient. Use the expression bindings Jordan shows.
