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?

nimbupani edited this page Feb 26, 2012 · 3 revisions

As we display browsers we recommend to use for a certain feature the API needs to detect what browser the viewer is using to view your page. The User's browser User Agent 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 the users. 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 HTML5 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 URI, and all users will get the list of ALL browsers that support the required features without any regard for UAs or Browser preferences.

Needless to say, UA information from any user is not stored on the server.

Clone this wiki locally