JS-based feature detection we can use server-side
|Reported by:||nacin||Owned by:|
In #20923 we added initial support for browser-based uploads in iOS 6, by detecting the user agent. This is a good stopgap, but we can do better.
We should implement a simple API that allows for us to do JS-based detection for mobile devices. We can use this for touch support, general upload ability, drag-drop upload ability, customizer support, and anything else that we can best detect in JS but that we need in order to make decisions in PHP.
We could probably model parts of it on how the user settings API works — leveraging cookies, but without the DB backend. A function could then return a value from the cookie if set, and otherwise, it'd use the default value passed to it.