Question

I am not really sure how to google this, so I thought I could ask here. I have the same image, posted on a page twice, will that slow down the execution time or will it remain the same since I am using the same resource?

Was it helpful?

Solution

The browser should be able to cache the image the first time it is requested from the source server. Most of the popular browsers should have this implemented. It should not have to load it twice, just once on the initial request to the server and then using the cached version the second time.

This also assumes the end user has the browser caching enabled. If that is turned off (even if the browser supports it), then it will make that extra request for the image since the cache is not there to pull from.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top