Do browsers (chrome, IE7+) cache image data, after first time downloading the image?
function updatePhoto(url) {
document.getElementById("bigImage").src = url
}
I have the following event handler function, which updates big image's src
attribute when user clicks a thumbnail. I don't want to do the heavy lifting each time user clicks a thumbnail. Do browsers retrieve the data from cache in the case when src
attribute is directly changed with javascript? Is it certain, or is there some technique to ensure to use the cached data?