Device detection was delegated to cat_api.js (Device.guessDeviceID), which mimicked the way CAT matches the User-Agent against device modules. CAT version 2 offers a user API method detectOS, which can be used instead, alleviating the need to keep updating USER_AGENTS in cat_api.js in order to follow device matching in CAT.
Update cat_ui to prefer this method when used against CAT API version 2 or later.
Let cat_user_api_proxy vary on User-Agent for caching responses for action detectOS
Device detection was delegated to
cat_api.js
(Device.guessDeviceID
), which mimicked the way CAT matches theUser-Agent
against device modules. CAT version 2 offers a user API methoddetectOS
, which can be used instead, alleviating the need to keep updatingUSER_AGENTS
incat_api.js
in order to follow device matching in CAT.cat_ui
to prefer this method when used against CAT API version 2 or later.cat_user_api_proxy
vary onUser-Agent
for caching responses for actiondetectOS