If I use the same image file(for example- image01.jpg) within a single page multiple times, will the browser load each image separately? or the image will only once be loaded and then will be reused for the rest of the embedded code? Below is an example.
<body>
<img src = 'images/image01.jpg"/>
<img src = 'images/image01.jpg"/>
<img src = 'images/image01.jpg"/>
</body>
In the above example, will the browser download image01.jpg once? or thrice?
Default behavior for most browsers is to cache images on first load. Multiple calls for same image would be served from the cache.
If you wish to disallow browser caching read more here: How to control web page caching, across all browsers?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With