Client request
These variables describe the HTTP request received by Fastly.
Device detection
Fastly exposes a number of VCL variables describing the client hardware and software
based on known User-Agent strings. The data is automatically updated on a
regular basis.
The data in these variables is based on mapping client-provided User-Agent headers
to an open source dataset provided by Fastly. Fastly periodically updates the dataset
to have the most recent data, but we cannot guarantee its accuracy.
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.
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.
- client.bot.name — Client device bot name
- client.browser.name — Client device web browser name
- client.browser.version — Client device web browser version
- client.class.bot — Client device is non-human traffic
- client.class.browser — Client device is a web browser
- client.display.touchscreen — Whether the client device display is a touch screen
- client.identified — Client user agent identified for device detection
- client.os.name — Client device OS name
- client.os.version — Client device OS version
- client.platform.gameconsole — Client device is a games console
- client.platform.hwtype — Client device primary hardware type
- client.platform.mediaplayer — Client device is a media player
- client.platform.mobile — Client device is mobile
- client.platform.model — Model of the client device
- client.platform.smarttv — Client device is a smart TV
- client.platform.tablet — Client device is a tablet
- client.platform.vendor — Client device vendor organization
- fastly_info.h2.is_push — Whether the request is part of a HTTP/2 push request
- fastly_info.host_header — The host header sent by the client
- req.body — Request body
- req.body.base64 — Request body (Base64-encoded)
- req.body_bytes_read — Total HTTP body bytes read from the client during a request
- req.bytes_read — Total bytes read from the client during a request
- req.enable_range_on_pass — Apply range handling for responses on pass
- req.enable_segmented_caching — Assemble the response from individually cacheable block-aligned file segments
- req.hash_always_miss — Force a miss for cached objects
- req.hash_ignore_busy — Don't wait for an ongoing fetch
- req.header_bytes_read — Total HTTP header bytes read from the client during a request
- req.headers — Collection of HTTP headers for a request
- req.http.{NAME} — HTTP headers by name for the request
- req.is_background_fetch — Whether VCL is being evaluated for a stale while revalidate request to a backend
- req.is_purge — Whether the current request is a purge request
- req.method — HTTP method for the request
- req.postbody — Alias of
req.body - req.proto — HTTP protocol and version of the request
- req.request — Alias of
req.method - req.url — HTTP URL for the request (URL-encoded)
- req.url.basename — File trailing name component of
req.url(URL-encoded) - req.url.dirname — Directory name component of
req.url(URL-encoded) - req.url.ext — File extension component of
req.url(URL-encoded) - req.url.path — Path component of
req.url(URL-encoded) - req.url.qs — Query string name component of
req.url(URL-encoded) - req.xid — Request ID
- time.elapsed — Time since the request started
- time.elapsed.msec — Time since the request started (milliseconds)
- time.elapsed.msec_frac — Fraction of the millisecond portion of the time since the request started
- time.elapsed.sec — Time since the request started (seconds)
- time.elapsed.usec — Time since the request started (microseconds since Epoch)
- time.elapsed.usec_frac — Fraction of the microsecond portion of the time since the request started
- time.end — Time the request ended
- time.end.msec — Time the request ended (milliseconds since Epoch)
- time.end.msec_frac — Fraction of the millisecond portion of the time the request ended
- time.end.sec — Time the request ended (seconds since Epoch)
- time.end.usec — Time the request ended (microseconds since Epoch)
- time.end.usec_frac — Fraction of the microsecond portion of the time the request ended
- time.start — Time the request started
- time.start.msec — Time the request started (milliseconds since Epoch)
- time.start.msec_frac — Fraction of the millisecond portion of the time the request started
- time.start.sec — Time the request started (seconds since Epoch)
- time.start.usec — Time the request started (microseconds since Epoch)
- time.start.usec_frac — Fraction of the microsecond portion of the time the request started