UA/UseCases
Jump to navigation
Jump to search
User Agent (UA) Detection Use Cases
Analytics
- Description
- Detection of platform for usage statistics by products like Google Analytics.
- Alternate Method
- Firefox OS can be deduced from the existing UA by grepping for the inclusion of the "Mobile" token and the absence of the "Android" token. This is an implicit declaration of the platform. This use case breaks if the same UA is used in the future for non Firefox OS devices.
Device Capability Detection
- Description
- List of device capabilities, such as geolocation, screen resolution, and media decoder support, in order for a site to tailor its content. The implementation is typically some sort of database of capabilities keyed off of UAs.
- Alternate Method
- Query the device for its capabilities directly via feature detection.
Device Specific Content
- Description
- Offering device specific or free content, such as access to free live video feeds, for a specific device. This may be part of a marketing campaign to promote the sale of a device or a specific brand.
- Alternate Method
- Restricting content based on the easily spoofable UA is not reliable. Other suggestions:
- Provide access to content based on the network connection or subscriber id.
- Ship an app on device.
Mobile, Tablet or Desktop Determination
- Description
- Similar to Device Capability Detection, determine the type of the device (mobile, tablet, or desktop) in order to send content tailored for the device type.
- Alternate Method
- Responsive design via CSS media queries. If UA detection is to be used, query for the "Mobi" but not "iPad" token for mobile, "Tablet", "Touch", or "iPad" token for tablet devices.