Patent ID: 8862777

Claim:
A computer-implemented method of detecting mobile devices performed by a web server, the method comprising: sending a domain name service (DNS) request to a DNS server for one or more mobile device detection strings; receiving a DNS response from the DNS server in response to the DNS request, the DNS response including the one or more mobile device detection strings; storing the mobile device detection strings included in the DNS response into memory; receiving a hyper text transfer protocol (HTTP) request from a client device for a resource specified, at least in part, by a domain name; determining, before initiating any associated script to process the HTTP request, whether the client device is a mobile device by comparing a characteristic of the client device to one or more of the mobile device detection strings received from the DNS server, wherein determining whether the client device is a mobile device comprises: comparing a User-Agent header in the HTTP request to one or more of the mobile device detection strings, determining that the client device is a mobile device if the User-Agent header matches one or more of the mobile device detection strings, and executing one or more modules in a web server application processing the HTTP request to determine whether the client is a mobile device before the HTTP request is forwarded to any server-side scripts; modifying the HTTP request received from the client device to include header information indicating that client is a mobile device; and forwarding the modified HTTP request to server-side scripts associated with servicing the resource.