After employing jQuery Ajax to communicate with a php script, it retrieves JSON data. This JSON Array Object is then stored in a JavaScript Variable called var myJSON = ajaxReturn;
Typically, the JSON values returned are not visible in the Page Source or JavaScript File, as they are dynamically rendered at runtime.
However, upon inspecting tools like Firebug
and accessing that variable in the console with alert(myJSON);
, the results become visible. This poses a risk for sensitive data that should remain confidential.
- What methods can be employed to safeguard the JSON data on the JavaScript side?