• About Us
  • Blog
  • Basket
  • Account
  • Sign In


Client Side Overrides

Sometimes, the User-Agent alone does not contain enough information for certain properties. For example:

  • The User-Agent of an iPhone does not provide sufficient information to determine the particular iPhone model: this is a deliberate choice Apple have made. However, javascript running in an iPhone browser can be used to determine the screen size and therefore the numeric model version.
  • The device may be used in Landscape or Portrait orientation which is not a static feature of the device.

When used with the Enterprise version of the data set, the API can augment static data about devices with dynamic information determined by interrogating the device using javascript.

Feature detection, when enabled, enhances properties in the 51Degrees dictionary to provider additional details. Once enabled, properties such as HardwareModel or Orientation will be populated or their values become more accurate.

Using Client Side Overrides

Important: Before invoking the FODPO() javascript object on the client side, a check must be carried out on the server for the presence of values in JavascriptHardwareProfile as shown in the snippet below:

namespace Detector
    public partial class WebForm1 : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            if (Request.Browser["JavascriptHardwareProfile"] != null)
                test_label.Text = "<script src=\"/51Degrees.core.js\" type=\"text/javascript\"></script>" + "<script type=\"text/javascript\"> new FODPO();</script>";
                test_label.Text = "";

ASP Developers

When used with ASP.NET the previous examples work unaltered. The necessary javascript includes are inserted automatically into the page.


The necessary javascript includes and script need to be added into the page by the developer. The following needs to be added to the header of the view:

<script src="/51Degrees.core.js" type="text/javascript"></script>
<script type="text/javascript">
new FODPO();