HTMLViewer.UserAgent

From Xojo Documentation

Property (As String )
aHTMLViewer.UserAgent = newStringValue
or
StringValue = aHTMLViewer.UserAgent

New in 2011r1

Supported for all project types and targets.

Supports getting and setting a custom user agent string.

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
Var 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