Fastly exposes a number of variables about the client hardware and software based on known User Agent strings. The data is automatically updated on a regular basis.
IMPORTANT: While Fastly exposes this data, we cannot guarantee its accuracy. The data in these variables is based on mapping client-provided User-Agent strings to a third-party dataset owned and provided by DeviceAtlas. Fastly periodically updates the dataset to have the most recent DeviceAtlas data.
IMPORTANT: Device information from DeviceAtlas, including data streamed by our log streaming service, may be used only in connection with your use of Fastly services. Use of DeviceAtlas data for any other purpose requires a license from Afilias Technologies Ltd, the supplier of DeviceAtlas.
Presence of data
It's possible for data to be not known for a particular User-Agent. When not present, numerical variables are set to -1
, booleans are set false
, and strings are set to the empty string.
It's possible to distinguish data being not known from data being explicitly set false
by making use of the client.identified variable. client.identified is set when all features are identified, and so a false
value for a property can be seen to be meaningful.
Client identification
Variable | Type | Description |
---|---|---|
client.identified |
BOOL | Available in all subroutines. This will be set when a client provides enough information to fully identify features of the device. That is, client.identified will only be set true when all features are identified.When only some features are found, their individual corresponding variables are still meaningful. For example, if client.class.mobile is true but client.identified is false then we know the device is a mobile phone. However, variables corresponding to other properties may not be known.In other words, the value of client.identified is only useful when a particular property variable is set false . |
Device types and details
These boolean variables are recommended for use when writing conditional statements in VCL.
NOTE: To find out more about variables that provide device vendor, model, and manufacturer details, contact your Fastly account manager or sales representative, or contact support@fastly.com.
Variable | Type | Description |
---|---|---|
client.platform.hwtype |
STRING | A string representation of the primary client platform hardware. The most commonly used device types are identified via boolean members. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging. Device Atlas provides a full list of potential values. |
client.platform.ereader |
BOOL | The client device is a reading device (like a Kindle). |
client.platform.gameconsole |
BOOL | The client device is a video game console (like a Playstation or Xbox). |
client.platform.mediaplayer |
BOOL | The client device is a media player (like blu-ray players, iPod devices, and smart speakers such as Amazon Echo). |
client.platform.mobile |
BOOL | The client device is a mobile phone. |
client.platform.smarttv |
BOOL | The client device is a smart TV. |
client.platform.tablet |
BOOL | The client device is a tablet (like an iPad). |
client.platform.tvplayer |
BOOL | The client device is a set-top-box or other TV player (like a Roku or Apple TV). |
Non-human client detection
Variable | Type | Description |
---|---|---|
client.class.bot |
BOOL | The client is not human (e.g., robots, crawlers, checkers, download agents, spam harvesters and feed readers). |
client.bot.name |
STRING | The name of the specific bot (e.g., Googlebot) making the request. |
client.class.browser |
BOOL | The client is using a web browser. |
client.browser.name |
STRING | The name of the browser in use on client device. Potential values can be found at the Device Atlas website. |
client.browser.version |
STRING | The version of the browser in use on client device. |
client.class.checker |
BOOL | The client is an automated checker (e.g., W3C Validator). |
client.class.downloader |
BOOL | The client is a utility (such as a download accelerator) primarily concerned with downloading files without rendering. |
client.class.feedreader |
BOOL | The client is a feed reader (e.g., RSS, Atom). |
client.class.filter |
BOOL | The client is a proxy-based content filter. |
client.class.masquerading |
BOOL | The device is pretending to be a desktop browser. |
client.class.spam |
BOOL | The client is a known email address harvester or spam bot.. |
Display details
Variable | Type | Description |
---|---|---|
client.display.height |
INTEGER | The total number of addressable pixels in the vertical direction of a rectangular display when held in its default orientation. |
client.display.width |
INTEGER | The total number of addressable pixels in the horizontal direction of a rectangular display when held in its default orientation. |
client.display.ppi |
INTEGER | The pixel density of the device's screen in pixels per inch (PPI). |
client.display.touchscreen |
BOOL | The client device's screen is touch sensitive. |
Operating system details
Variable | Type | Description |
---|---|---|
client.os.name |
STRING | The name of the operating system installed on the client device. The comprehensive list of potential values can be found at the Device Atlas website. |
client.os.version |
STRING | The version of the operating system installed on the client device. |