The Detector library is an attempt to make device detection libraries based on the analysis of UA strings obsolete. The problem with this is that it needs to send the test page to a browser that supports JavaScript and has it turned on. In order to speed up the page loading, it employs the following two mechanisms:
Using the server cache of UA string footprints (which ironically makes it, in a way, a UA string analysis library)
Storing client information in both a session variable and a cookie
The following figure illustrates information flow between the Detector and the browser. The HTTP request drawn on the left side represents the first and each consecutive "regular" request. The one drawn on the right side is sent from the test page and may occur as a second request when none of the conditions in the center of the figure is met. In other words when the user requests any page on the website, Detector tries to determine the following:
If cookies and JavaScript are supported...