I don't normally do web stuff so I have a question that might seem stupid.
I have something akin to a stopwatch which shows a count down and I update the text in the div once second. All is fine so far.
I have a background image, one when the countdown is greater than zero, one at zero. To change the image I grab the IMG I'd and change the SRC property depending on the state (>0).
This works but I wonder if it is bad to keep setting the image source even when the image doesn't change? I don't want The image reloading every second. I wonder if the browsers simply see the URL is the same so doesn't do anything.
Will post code tomorrow if need be.
I have something akin to a stopwatch which shows a count down and I update the text in the div once second. All is fine so far.
I have a background image, one when the countdown is greater than zero, one at zero. To change the image I grab the IMG I'd and change the SRC property depending on the state (>0).
This works but I wonder if it is bad to keep setting the image source even when the image doesn't change? I don't want The image reloading every second. I wonder if the browsers simply see the URL is the same so doesn't do anything.
Will post code tomorrow if need be.