Members
-
<static> headers
-
The default
http-headers
that are sent with every AJAX request to the server. More can be added and existing items can be modified.- string
- Sat, 29 Oct 1994 19:43:31 GMT
- string
- XMLHttpRequest
- string
- FusionCharts
- string
- text/plain, */*
- string
- application/x-www-form-urlencoded; charset=UTF-8
Properties:
Property Description "If-Modified-Since"
Prevents cacheing of AJAX requests.
"X-Requested-With"
Lets the server know that this is an AJAX request.
"X-Requested-By"
Lets server know which web application is sending requests.
Accept
Mentions content-types that are acceptable for the response. Some servers require this for Ajax communication.
"Content-Type"
The MIME type of the body of the request along with its charset.
-
<inner> counters
-
These counters keep a track of various http requests sent by FusionCharts. These can be retrieved using FusionCharts.ajax.stats
Properties:
Property Description objects
The number of internal
Ajax
objects created by FusionCharts. This is not same asXMLHttpRequest
object since oneAjax
object can have a number ofXMLHttpRequest
objects.xhr
A count of all
XMLHttpRequest
objects created.requests
Sum of all requests sent to server (both GET and POST.)
success
The total number of requests that had a successful return from server.
failure
The total number of requests that failed to communicate with server due to various factors.
idle
XMLHttpRequest
objects that are idle for later use or has not been disposed yet.
FusionCharts framework level API
Methods
-
<static> stats(type) → {FusionCharts.ajax~counters}
-
Returns the statistics of AJAX requests sent by FusionCharts.
Parameters:
Parameter Description type
- string
-
<optional>
Optionally, one can request a specific type of statistic by providing the type as one of the property-name of FusionCharts.ajax~counters.
Returns:
If no specific nature of statistics is passed to the
type
parameter, this function would return an object containing all counters, otherwise it returns a specific counter as in FusionCharts.ajax~counters.Type: