I stumbled across this weird situation(to me) where I might have an image in a html doc multiple time ... lets say 10 times the exact same image in one html file. I was curious what kind of optimization could be used here or if any exist.
some thoughts...
Only load visible first ? Does the browser realize they are the same and more quickly load the pics? whats good practice for a scenario like this?
To put a little more detail into the question I have essentially multiple web pages in one using some JavaScript to switch in content.
so i have:
<div id='Page1'>
<div id=masterheader ><img src=logo.png></div>
<img src=logo.png>
<!--content-->
</div
<div id='Page2'>
<div class=header></div>
<!--content-->
</div
Im using JavaScript to grab the inner html of the master_header and place that html in all the class headers... Im just worried as the amount of pages might grows significantly how will my page load be affected by my logo being rendered multiple times.