I don't know how to delete from cache uploaded image. I wanna have only one image in cache storage.
<button style="width: 300px; height: 300px;"></button>
<script type="text/javascript">
var q = document.querySelector('button')
var i = 1;
q.addEventListener('click', function()
{
q.style.backgroundImage = "url('foto/"+ i +".png')";
i *= -1
})
</script>