Friday, October 3, 2014

Device detection principles

The device detection logic play very important role where we have to offer omni channel experience across multiple devices. The easiest and quicket way is to check user agent. We can also use regular expression to detect device from user agent. But it becomes more error prune where many devices keep coming every day and we need to support compatible services to all devices.

There is also a way to to store these agent info in DB. Persisting DB make sure we have detected many devices correctly for offering better user experience. In case we don't find any entry in DB that must be new device, can do a write operation to include this agent as well. Persisted user agent can be loaded and use regular expression for better matching agent to offer most suitable user experience.

No comments:

Post a Comment