JSON calls are a costly operation as they involve network
overheads, database overheads, and CPU cycles. In order to use them
efficiently keep the following in mind:
- Make calls
sparingly.
- Perform optimal
browser caching.
- Avoid polling.
- Use a standard
JSON library or JavaScript framework. JSON is used widely for JavaScript
request/response so there are many frameworks supporting JSON. It
is recommended to use any up-to-date JavaScript framework for communication
with a TPM JSON server.
- Clean the
browser cache properly. Prolonged usage of JSON without clearing
out old data can result in unnecessary browser memory usage.
- Specify allowable
clients in the nHTTP listener to secure the JSON server.