title: Auto update Image
body: <p>I have an image and I want to automatically update it using either javascript, jquery or ajax.</p>
  
  <p>Until now I have the following code.</p>
  
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  &lt;script language="JavaScript"&gt;&lt;!--
    function refreshIt() {
      if (!document.images) return;
        document.images['myCam'].src = 'swt.png';
        setTimeout('refreshIt()',50); // refresh every 50ms
   }
    //--&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body onLoad=" setTimeout('refreshIt()',50)"&gt;
  
  &lt;img src="swt.png" name="myCam"&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I think it is not working because the browser is caching the image and it is not updating the image correctly.</p>
  
  <p>Can someone provide me a working example?</p>