Skip to Content

Device

The device object provides information about the user’s device, such as browser, platform, and device type.

Usage Example

{%- comment -%} Show device information {%- endcomment -%} <p> Device: {{ device.device }}<br> Platform: {{ device.platform }}<br> Browser: {{ device.browser }}<br> {% if device.is_robot %}This is a robot device.{% endif %} </p>

Properties

browser

Returns the browser for the device.

device

Returns the device type name.

is_robot

Returns true if the device is considered to be a robot.

platform

Returns the platform for the device.

Last updated on