title: How to only Auto-Refresh a div if the content has changed?
body: <p>I am hoping this is possible.</p>
  
  <p>What I am doing is using the Facebook PHP SDK and the Social Graph API to retrieve posts from a page and refreshing it every x millseconds but this is a bit of waste of resources if the content is exactly the same so I was wanting to only do the refresh is the content has changed.</p>
  
  <pre><code>&lt;div id="bottom-bar"&gt;
      &lt;?php require("graph.php"); ?&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  var auto_refresh = setInterval(
  function ()
  {
      $('#bottom-bar').fadeOut("slow").load('graph.php').fadeIn("slow");
  }, 30000); // refresh every 30000 milliseconds
  &lt;/script&gt;
  </code></pre>
  
  <p>So, <code>graph.php</code> has the massive array that is returned by the page and I am taking out the data I want etc but is there a way to only do it if it's different than before?</p>
  
  <p>Thanks for all your help,</p>