<img src="test.php" />
where test.php generates an image with a random number.
Itried :
$('#verifyimage').click(function() {
$(this).attr('src',$(this).attr('src'));
});
But it doesn't work.
<img src="test.php" />
where test.php generates an image with a random number.
Itried :
$('#verifyimage').click(function() {
$(this).attr('src',$(this).attr('src'));
});
But it doesn't work.
Add a timestamp or a random number:
var timestamp = new Date().getTime();
$(this).attr('src',$(this).attr('src') + '?' +timestamp );
You can force a refresh by appending a random string at the end, thus changing the URL:
$('#verifyimage').click(function() {
$(this).attr('src', $(this).attr('src')+'?'+Math.random());
});