Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    48
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Does the browser load image twice?

    If I set the same image in two different <img/> tags, will the browsers load twice the same image, or it will load once and share it across the html?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    or it will load once and share it across the html?
    That's correct. Browser will use it's cache to load the image for the subsequent request.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    bloody86 (11-12-2010)

  • #3
    New Coder
    Join Date
    Oct 2010
    Posts
    48
    Thanks
    10
    Thanked 0 Times in 0 Posts
    So if one img tag contain original image and other same image but with redused size, second tag will use the same image and just reduce his size?

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Yes, it'll use the cached copy, as long as you use the same src.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •