caching - How to refresh image.src dataurl, prevent cache? -


i have following code loads image choose files. loads , draws canvas, if make change the image file via image editor, , reload it- doesn't refresh , show changes(it uses cached version)..

how can refresh??

    var reader = new filereader();     reader.onload = function(event){           img[num] = new image();          img[num].onload = function () {              //handle image stuff         }         img[num].src = event.target.result;     }     reader.readasdataurl(e.target.files[0]);     

sorry, issue input file change event. since filename wasn't different, wasn't calling change event

if add line clear value, works.

        $( "#imagereplacer" ).on("change", function( event ){              replaceimage(event);              $(this).val('');         }).hide(); 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -