Importance of Identifying Mobile Traffic
Over the past decade mobile technology evolved to the point where a phone has more memory and a faster CPU than an average Desktop computer used to have some 8 years ago. In conjunction with faster Internet access, better coverage and cheaper carrier charges this caused a substantial rise in the amount of web traffic originating from mobile devices. Data suggests we are very close to seeing a third of all web traffic originating from mobile devices. (http://51degrees.com/Products/MobileAnalytics?chartid=143/) (http://51degrees.com/Products/MobileAnalytics?chartid=144/). The trend is bound to continue as LTE (4G) networks are spreading throughout the world.
Many businesses and website owners fail to recognize this trend at all while others fail to adjust. However, even the most basic level of detection that determines whether the requesting device is mobile or not can prove to be very beneficial.
Suppose you run a personal or a business Wordpress blog with a thousand of unique visitors per day. While the number is not that large, about a third of them are likely to be using a mobile device. When it comes to browsing the web from a smartphone there is hardly anything worse than loading a website that was designed with large Desktop computer screens in mind, containing a lot of unnecessary elements and overloaded with graphics. Detecting a mobile device allows you to adjust the way information is presented by redirecting to a mobile version of your website or supplying a different style sheet.
On the opposite end we have businesses that handle large amounts of data each day. An Ad Network business with millions of requests per second is one example. Mobile device detection is very beneficial in this case as mobile screens may have a high resolution, but physical screen size is fairly small and the way users interact with a mobile device is different from how they interact with a desktop computer or a laptop. By detecting the device is mobile you can provide ads in the appropriate location and format. At the same time having to deal with millions of requests per second means your mobile detection solution has to be fast.
The conventional way to deal with device detection is to use an XML file to store information about devices and a set of regular expressions to match the requesting device against existing devices. This is a valid approach, however as the data file grows larger device detection will slow down. Additionally this approach does not take in to account changes in software, so the same phone using a different browser or a different version of the operating system could have a different entity in the database for each combination.
51Degrees Device Detection
51Degrees recognizes the pitfalls of the conventional device detection methods and has developed a solution that is fast, reliable and future-proof. As you shall see, it is easy to implement and it provides consistently fast and reliable device detection across many platforms and technologies.
To detect devices we use two methods: Trie and Pattern.
- Pattern is a fast and memory efficient method capable of delivering detection times of less than 0.1 milliseconds. This is achieved by our patent applied for algorithm, which uses important parts of http headers to find information about the hardware, software and browser version of the device as well as distinguish between search bots, crawlers and human users. Pattern matching can process well over 5 000 requests per second per CPU core and is generally sufficient for most uses. Learn how Pattern device detection works.
- Trie detection method requires a significant amount of memory to be allocated at initialisation as it builds a tree of all known devices. Trie is extremely fast and outperforms hashing algorithms. Trie can easily process millions of requests per second even on mediocre hardware. Learn how Trie detection works.