Check out the latest documentation.

Client Side Overrides

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 to determine additional information. Examples include:

  • The User-Agent of an iPhone does not provide sufficient information to determine the model of iPhone. 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.

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

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:

										
										<?php
										
										
										if
										
									(
										
										isset
										
									(
										
										$_51d
										
									[
										
										'JavascriptHardwareProfile'
										
									]))
	{
		
										
										echo
										
										
										"<script src=
										
										
										\"
										
										
										51Degrees.core.js.php
										
										
										\"
										
										
										 > </script>"
										
									;
		
										
										echo
										
										
										"<script>new FODPO();</script>"
										
									;
	}
	
										
										?>
										
									

Note that information from this feature will not be available until the device has made at least one full request. Only subsequent requests will have this data.