title: PHP + JQuery/AJAX - Loader with Percentage
body: <p>I have a frontend app where i call a PHP script (lets call it script.php) that takes some time to complete. I want to show (on the client side) the percentage completed. </p>
  
  <p>On the file script.php i can at any time calculate the percentage of jobs completed.  I searched a bit and a possible solution should be:</p>
  
  <ul>
  <li>On the client side call the script.php file</li>
  <li>Start a polling operation using another php script to get the percentage from script.php</li>
  <li>Display this percentage on client side.</li>
  </ul>
  
  <p>My problem is how do i get and "share" this percentage value between the script and the other php file to display on the client side.</p>
  
  <p>What options do i have using JQuery/AJAX (i was trying to avoid the use of cached solutions).</p>
  
  <p>Thanks</p>