<script> document.getElementById('myID').src="myscript"; </script> HTML: <img src="myscript" id=myID> |
This won't work in IE. You need this:
<script> var randomNo=Math.floor(Math.random()*10000); document.getElementById('myID').src="myscript?"+randomNo; </script> |
As IE will refer to cache data if it sees the data is the same as the next click.
You can also change to other methods of generating random numbers. As long as the query string is different every time, IE will not refer to cache data and fetch from the server instead.
No comments:
Post a Comment