title: $.getJSON does not retrieve up-to-date information
body: <p>I have a MySQL database set up. I have a PHP file that connects to the database and creates an array out of the database's information. It then echoes that array encoded as JSON. I have an HTML file with JavaScript to retrieve this JSON and log it on the console.</p>
  <p><strong>The issue:</strong> When I run the HTML file after updating the table, it won't show the new information. I have to manually run the PHP file that creates the JSON before running the HTML file for the console to show me the updated information. <em>How do I get the HTML file to always retrieve the most up-to-date information from my database without running the PHP script manually?</em></p>
  <p>Here is the PHP file (db.php):</p>
  <pre><code>&lt;?php
  
  include (&quot;database_connect.php&quot;);
  
  $sql = &quot;SELECT * FROM markers&quot;;
  $result = $conn-&gt;query($sql);
  
  $array = array();
  $i = 0;
  
  while($row = $result-&gt;fetch_assoc()) {
      $array[$i] = $row;
      $i++;
  }
  
  echo json_encode($array);
  
  $conn-&gt;close();
  
  ?&gt;
  </code></pre>
  <p>Here is the HTML file (db.html):</p>
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  
  &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js&quot;&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;script&gt;
  $.getJSON('db.php', function(data) {
      console.log(data);
      }
  );
  &lt;/script&gt;
  
  &lt;/html&gt;
  </code></pre>