Delete file from temporary internet files in javascript

by Rekha 2010-01-21 19:47:18

If you want to display the images or something from your server instead of cache you can do the following.

You can't do anything at all to the cache using Javascript, but you can change the url of the image so that it's not in the cache.

Just add a query string to the url of the image, and use the current time to make it unique each time:


<script type="text/javascript">
document.write('<img src="images/timage.gif?t=' + new Date().getTime() + '" alt="" />');
</script>

Tagged in:

1829
like
0
dislike
0
mail
flag

You must LOGIN to add comments