Mobile Detection for Microsoft Internet Information Services (IIS)

Targeting mobile devices has become increasingly important for user experience, regardless of the web server technology in use.

Device Detection Intelligence on Windows

When it comes to detecting mobile devices visiting a website, you can choose to implement best practice device detection server-side or at application level. DeviceAtlas for IIS solves 3 key challenges by providing device intelligence at the server level:

  • Maintaining valid pattern mappings with the continued flood of new device models coming to market daily.
  • Achieving the highest possible levels of device detection accuracy (for example, distinguishing iOS models correctly, not reporting false positives)
  • Correct device classification (Tablets, TVs, Set-Top Boxes, Smart Phones, Low end phones, etc.)

In order to respond to those problems on Microsoft IIS web server, a DeviceAtlas module is now available. This service is based on the Device Detection and Carrier Identification C++ APIs, ensuring high performance solutions for enterprise.

DeviceAtlas IIS Installation

To accommodate the most common use cases possible, both HTTP Module and ISAPI Filter exist and support 32 and 64 bit versions, for the following operating systems:

  • Windows Server 2003 (Windows NT 5.2)
  • Windows Server 2003 R2 (Windows NT 5.2)
  • Windows Server 2008 (Windows NT 6.0)
  • Windows Server 2008 R2 (Windows NT 6.1)
  • Windows Server 2012 (Windows NT 6.2)
  • Windows Server 2012 R2 (Windows NT 6.3)

The DeviceAtlas IIS installer is available for easy integration.

           

 

Configuration and Usage

After setting the Device Detection and/or Carrier Identification module and the data files, the IIS is ready to work.

URL Redirection rules can easily use HTTP headers set by the DeviceAtlas module to present your visitors with the optimum experience when they visit your application.

<rewrite>
   <rules>

      <-- REDIRECT TO TABLET OPTIMIZED SITE -->

      <rule name="TabletDevices" enabled="true" stopProcessing="true">
         <match url="(.*)" />
         <conditions>
            <add input="{HTTP_X_DEVICEATLAS_ISTABLET}" pattern="1"/>
         </conditions>
         <action type="Redirect" url="http://tablet.mywebsite.com" />
      </rule>

      <-- REDIRECT TO WML SITE -->

      <rule name="WMLMobileDevices" enabled="true" stopProcessing="true">
         <match url="(.*)" />
         <conditions>
            <add input="{HTTP_X_DEVICEATLAS_MOBILEDEVICE}" pattern="1"/>
            <add input="{HTTP_X_DEVICEATLAS_MARKUP_WML1}" pattern="1"/>
         </conditions>
         <action type="Redirect" url="http://wml.mywebsite.com" />
      </rule>

   </rules>
</rewrite>

Accessing the DeviceAtlas properties from any ASP.NET application doesn't require any additional elements, you automatically have access to all device properties through the HTTP headers.

// DETECT MOBILE DEVICES
if (Request.Headers["X-DeviceAtlas-mobileDevice"] != null &&
    Request.Headers["X-DeviceAtlas-mobileDevice"].ToString().Equals("1")) {
    
    // DO SOMETHING SMART HERE
}

More technical information can be found on the API Documentation page.

Performance

The performance of the DeviceAtlas IIS module with both Device Detection and Carrier Identification enabled is around 1250 requests per second including the IIS overhead when run on a server with an i7 processor and 8GB memory. The average memory usage is between 60 and 110 MB per worker.

In a scenario where the average page generation time is 400 ms the DeviceAtlas IIS module adds about 0.03 ms per request.

 

Trial version

If interested in evaluating this module or any other Enterprise API for free, you can contact us to arrange your free locally installed trial today.

Related tags


deployment options