Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

How does the UA Detection work?

Qqwy edited this page Oct 1, 2013 · 3 revisions

As we present a list of browsers we recommend a user upgrading to depending on the feature they are missing, it's necessary for us to perform a level of UA (User agent) detection to establish what browser is being used to view the page. The user's UA information is matched against this list of UAs and then based on the information collated from caniuse's data feed, we return what would be the optimal set of browsers to recommend to them. The agents.json file classifies UAs into mobile or desktop to provide the following recommendations:

  • If the user is using a desktop browser that does not support the required features:

    • If there is a newer stable version of that browser that does support the required features, it is recommended (and no other browser).
    • If there is no stable version of that browser available that supports the required features, all the other desktop browser that support these features are recommended.
    • If there is no other stable version of any Desktop browser that supports this feature, nothing is recommended.
    • If the user is on a non-windows machine, no IE recommendations will appear even if IE supports the required HTML5 features (as there is no supported version of IE on these platforms).
  • If the user is using a mobile browser that does not support the required HTML5 features:

  • If there is a newer stable version of that browser, the API recommends it.

  • If there are other mobile browsers that support the required features, the API recommends them.

You can override this recommendation preference by setting noagent as an option in the API call, and all users will get the list of ALL browsers that support the required features without any regard for UAs or Browser preferences.

The UA information detected is neither collected nor stored on the server.

Clone this wiki locally