Welcome Guest Search | Active Topics | Sign In | Register

WebBrowser: Get default user agent? Options
Jeppe HS
Posted: Tuesday, February 3, 2015 9:17:22 AM
Rank: Advanced Member
Groups: Member

Joined: 1/5/2015
Posts: 60
Hi

Is it possible to get the default user agent used by the EO browser from the WebView?

I know I could use sites like http://whatsmyuseragent.com/, but as the user agent changes according to platform I would very much like to avoid hardcoding it.

The reason for this question is, we would like to add our own machine name to the existing user agent.

I've tried getting WebView.CustomUserAgent but it only returns an empty string.


Jeppe Haugaard Sørensen
eo_support
Posted: Tuesday, February 3, 2015 10:58:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

You can initialize a WebView, then call EvalScript("Navigator.userAgent") to get the default user agent.

Thanks!
Jeppe HS
Posted: Wednesday, February 4, 2015 2:40:37 AM
Rank: Advanced Member
Groups: Member

Joined: 1/5/2015
Posts: 60
Thanks, I'll try that.





You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.