Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

WebView.SetCustomUserAgent

Sets the custom user agent text.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WebView 2.9 Yes No No No No

MBS( "WebView.SetCustomUserAgent"; WebViewerRef; UserAgent )

Parameters

Parameter Description Example value
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function. "web"
UserAgent The new useragent. "FileMaker Browser"

Result

Returns OK or error.

Description

Sets the custom user agent text.
This user agent is reported to websites. By using a different user agent string you can tell a website that FileMaker is using Firefox, Chrome or Internet Explorer instead of Safari (WebKit).

Examples

Set custom user agent to be Internet Explorer 7:

MBS( "WebView.SetCustomUserAgent"; "web"; "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)" )

Set custom user agent to be Firefox 15:

MBS( "WebView.SetCustomUserAgent"; "web"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0.1" )

See also

Example Databases


WebView.SendCommand   -   WebView.SetEditable

Feedback: Report problem or ask question.




Links
MBS Xojo blog