|
Rank: Advanced Member Groups: Member
Joined: 6/13/2014 Posts: 38
|
Hi There,
I have set CustomUserAgent of EO.WebBrowser control as below
private const string MYUSERAGENT = @"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.170 Safari/537.36/MYUSERAGENT";
m_webViewMain.CustomUserAgent = MYUSERAGENT;
but it is now reflecting while accessing it in javascript like
alert(navigator.userAgent.IndexOf("MYUSERAGENT"));
is there any other way to access the EO.WebBrowser object's user agent string in web pages it is hosting ?
Note: UserAgent string is correct for asp.net server side context.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
You can't change the user agent visible to JavaScript, the custom user agent you set is just an HTTP header entry sent to the server. If you wish to detect whether your page is running EO.WebBrowser, you can check whether global variable "eoWebBrowser" exists.
Please feel free to let us know if you still have any more questions.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/13/2014 Posts: 38
|
Thanks for the Quick Reply, it has solved our problem
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
You are very welcome. Please feel free to let us know if there is anything else.
Thanks!
|
|