many plugin, even my Hyper Cache and others, need to detected the device type (looking at the user agent) to serve different content or to chenage their behavior.
It’s complicated to maintain detection rule on every plugin and the device detection is very important, not everything can be resolved with media queries.
My suggestion is to introduce a drop-in mechanism to let a plugin (like done by caching plugin) to detect the device and store its result in a global variable (or where is better to store it) so other plugin can rely on that information in a standard an uniform way. Of course the detection can provide a structured information: type and sub-type or like.
That dropin must work before the advanced-cache.php drop in since even that code may need to know the agent type to look into the correct cache area.
- The topic ‘Stadardized device detection’ is closed to new replies.