# How to access to HTMLViewer.UserAgent ?

**URL:** <https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960>\
**Category:** General\
**Created:** [June 1, 2014, 9:17am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960 "2014-06-01T09:17:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [June 1, 2014, 9:17am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/1 "2014-06-01T09:17:50Z")

</div>

Hi,

I found how to set the HTMLViewer.UserAgent, but what I want is to get it.

Ideas ?

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [June 1, 2014, 9:28am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/2 "2014-06-01T09:28:12Z")

</div>

> [@94086:@Emile Schwarz](#):
>
> I found how to set the HTMLViewer.UserAgent, but what I want is to get it.

From what I can see, HTMLViewer has no UserAgent default value.

Otherwise, when it has been set, you get it by HTMLViewer.UserAgent as string

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [June 1, 2014, 10:17am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/3 "2014-06-01T10:17:11Z")

</div>

Hi Michel,

as far as I can see, Safari (last for 10.8.5) have one. It also can be modified (in the development menu).

BTW: the [HTMLViewer.UserAgent](http://documentation.xojo.com/index.php/HTMLViewer.UserAgent) page displays a used OS X that is 10.5.8.

We all know that Xojo does not runs anymore below 10.7.

That was the Sunday joke.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [June 1, 2014, 10:28am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/4 "2014-06-01T10:28:21Z")

</div>

I do not had internet while I was working with USerAgent, yesterday. Now, with Michel answer and SubWay Wifi, I get two entries in wikipedia:

[User-Agent (US)](http://en.wikipedia.org/wiki/User-Agent) and [User-Agent](http://fr.wikipedia.org/wiki/User-Agent) more complete because it gives now to get the user agent for a lot of development environments (VB6 for example).

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [June 1, 2014, 10:57am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/5 "2014-06-01T10:57:19Z")

</div>

[quote=94090:@Emile Schwarz]as far as I can see, Safari (last for 10.8.5) have one. It also can be modified (in the development menu).

[/quote]

Apparently, in Native mode, the HTMLViewer reports the same as the default browser.

I built a WE app and monitored the user agent the HTTPViewer sent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_9\_3) AppleWebKit/537.75.14 (KHTML, like Gecko)

Now, it would make sense that the default property reported by HTMLViewer.UserAgent be the same. Instead, it is empty. Could be considered a bug, as the LR just says nothing about that incongruity.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [June 1, 2014, 11:01am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/6 "2014-06-01T11:01:10Z")

</div>

HTMLViewer on Mac, Win or Linux? With(out) WebKit?

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [June 1, 2014, 11:10am UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/7 "2014-06-01T11:10:32Z")

</div>

> [@94100:@Christian Schmitz](#):
>
> HTMLViewer on Mac, Win or Linux? With(out) WebKit?

HTMLViewer.UserAgent is said by the LR to work only on Mac. And I checked on Mac.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [June 1, 2014, 12:03pm UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/8 "2014-06-01T12:03:39Z")

</div>

Me too.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [June 1, 2014, 12:30pm UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/9 "2014-06-01T12:30:24Z")

</div>

for Windows, I have in plugin a function:

MsgBox HTMLViewer1.IENavigatorUserAgentMBS

---

<div class="post-metadata">

**Author:** ![Bob\_Keeney](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/54ee81/32.png) [@Bob\_Keeney](https://forum.xojo.com/u/Bob_Keeney)\
**Post date:** [July 23, 2014, 2:36pm UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/10 "2014-07-23T14:36:23Z")

</div>

[quote=94117:@Christian Schmitz]for Windows, I have in plugin a function:

MsgBox HTMLViewer1.IENavigatorUserAgentMBS[/quote]

What about WebKit on Windows? The built-in Xojo UserAgent only works on Mac OS X and is ignored in Windows.

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [July 23, 2014, 2:43pm UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/11 "2014-07-23T14:43:29Z")

</div>

[https://forum.xojo.com/14120-detecting-xojo-from-a-webpage](https://forum.xojo.com/14120-detecting-xojo-from-a-webpage)

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:15pm UTC](https://forum.xojo.com/t/how-to-access-to-htmlviewer-useragent/16960/12 "2020-10-29T17:15:10Z")

</div>


