Anyone can give me a hint why this getJSON not really calling the PHP page. I am trying to understand some existing code which uses getJSON.
"getfolders.php" page would write a message to a log first as the first step.
My javascript is as below:
$.getJSON('api/getfolders.php', {});
//window.location="api/getfolders.php";
If I use getJSON, it is only working sort of first time entering this javascript, if I click CTRL+F5
, it doesn't trigger the "getfolders.php" multiple times.
However if comment out getJSON and use window.location instead, every CTRL+F5 will trigger the "getfolders.php" for every time.
Is it some behavior in ajax causing this issue?
Thanks