- Updating Device Data
- Web Apps
- Reference Pages
- Useful Links
- Supported Versions
In this era of high speed broadband and the abundance of libraries that simplify Web development, it is very easy to make the mistake of not taking bandwidth into account. Despite the spread of 4G networks and even the plans for 5G networks, the reality is such, that most mobile operators are struggling to consistently deliver a reliable 3G service in all areas.
Using Performance Monitoring
First, the FODBW has to be constructed on the page:
This creates a cookie with a timestamp that the server can use to measure how quickly responses are received. The API creates 5 request attributes that can be accessed from the request object in a Servlet with the getAttribute method as follows:
Note that if the FODBW hasn't been run and not enough bandwidth data has been collected, the getAttribute method will return null.
When used with the Enterprise version of the data set the API will return information about the performance of the connection and response times via the Context. The values change for every page request and will only start to appear after the 2nd request to the web server. The following properties are available:
|51D_LastResponseTime||long||The time taken for the web page to start rendering after the user initiated the request in milliseconds. May return -1 if there is not enough data to calculate this.|
|51D_LastCompletionTime||long||The time taken for the web page to complete rendering after the user initiated the request in milliseconds.|
|51D_AverageResponseTime||long||The average time taken for the page to start rendering, in milliseconds, after the user initiated the request during the previous 5 minutes.|
|51D_AverageCompletionTime||long||The average time taken for the page to complete rendering, in milliseconds, after the user initiated the request during the previous 5 minutes.|
|51D_AverageBandwidth||int||The effective average bandwidth of the connection as measured by the amount of HTML data sent and received, measure in bytes/seconds. The value will vary from a network level inspection as it does not include the TCP or HTTP overhead. It should be used as a guide to the available effective bandwidth. The time values are of more practical use to developers.|
The values returned provide a good indicator of performance. Their accuracy gets better over time and when used on larger pages. Small pages will have a much higher margin of error.