• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is the image downloaded many times or just once

 
Doshi Milan
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
In an HTML page if the same image is present at 5 places. Then will it be downloaded 5 times or is it downloaded just once and rendered 5 times.
Is it true for .js files also ?( The question of having the same .js file multiple time can be possible due to includes in JSPs ).
Thanks in advance,
regards,
Milan Doshi
 
Randall Twede
Ranch Hand
Posts: 4469
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i put off answering this because im not 100% certain, but im pretty sure the browser only downloads one file
 
James Hobson
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be that as long as the Browser can be sure the file is the same (it has the same url) it will read it from cache.
I think this means that if the same image is used on two pages, if it is referenced by a relative url it may not be read from cache.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic