title: Is there a way to refresh an image after an ajax file upload in jQuery?
body: <p>I have an image on the page. I'm using the AJAX form plugin to upload a single image, and after the photo has uploaded I'd like to refresh the image that is already on the page.</p>
  
  <pre><code>$("#profilePicForm").ajaxForm(function() { 
      alert("Photo updated");
      $("#newPhotoForm").slideToggle();
      $("#profilePic img").load(function() {
          $(this).hide();
          $(this).fadeIn('slow');
      }).attr('src', '/Content/UsrImg/Profiles/PhotoName.jpg');
  }); 
  </code></pre>
  
  <p>The newly uploaded file has the same name as the old one, all that is needed is a way to refresh the image. Since it is the same name, cache is getting in the way - the <a href="http://jqueryfordesigners.com/image-loading/" rel="noreferrer">method described in this article didn't work</a>.</p>
  
  <p>Any ideas?</p>