This API is available on Firefox OS for internal applications only.

Retrieval of data usage statistics is now done via the MozNetworkStatsManager.getSamples method.


The getNetworkStats method allows to retrieve the data usage statistics for the various connection types.


var request = navigator.mozNetworkStats.getNetworkStats(options);


A regular JavaScript object with the following properties:
  • connectionType: one of the strings available from connectionTypes or null (in that case the data from all connection types are merged)
  • start: the date of the first data usage chunk to retrieve
  • end: the date of the last data usage chunk to retrieve


A DOMrequest object to handle the success or error of the operation. In case of success, the request's result is a MozNetworkStats object providing the requested information.


Not part of any specification.

See also

Document Tags and Contributors

Contributors to this page: wbamberg, chrisdavidmills, zeller, fscholz, MHasan, kscarfone, Jeremie
Last updated by: wbamberg,