title: Image is not changing instantly
body: <p>I am changing <strong><code>img</code></strong> after successful response from server but it not changing instantly. I have to reload page to see new image.</p>
  
  <p>After uploading photo to server Below is the URL that i am using for profile photo for userid <code>${userId}</code>. At the end of url i am using random number to avoid cache.</p>
  
  <pre><code>var img = "photohandler/fetchprofilepics/${userId}/profilePhoto/&lt;%=new Random().nextInt()%&gt;";
  $(".profilePhoto").attr("src",img);
  </code></pre>
  
  <p>If paste same url in browser its showing image.</p>
  
  <p>on server side in spring/servlet:</p>
  
  <pre><code>byte bytes[] = new byte[byteBuffer.remaining()];            
  byteBuffer.get(bytes, 0, bytes.length);
  bufferedOutputStream = new BufferedOutputStream(response.getOutputStream());
  bufferedOutputStream.write(bytes);
  </code></pre>