HTMLViewer.UserAgent

From Xojo Documentation
Jump to: navigation, search
Property (As String )
aHTMLViewer.UserAgent = newStringValue
or
StringValue = aHTMLViewer.UserAgent

New in 2011r1

Supports getting and setting a custom user agent string. It is in the Open event of the control.

Notes

UserAgent works on macOS and Windows (using the Native Renderer). Changing it has no effect on Linux or when on Windows using the WebKit Renderer.

Example

This example sets the UserAgent.

If Me.IsAvailable Then
Dim agent As String
agent = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16"
Me.UserAgent = agent
End If
Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About