SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    avoiding download of an image more than one time?

    Hello
    I have a couple of questions:

    1- Lets say that I have the same image(from the same url) called with html 2 or more times in one page.
    Will the browser download the image each time it's called with html? or will it simply download the image one time and then repeat it in the page?

    2- If the browser downloads the image each time, is there a way to make the browser download the image only one time and then repeat it without wasting bandwidth? with javascript maybe?

    I hope I was clear enough

    thanks

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes -- no matter how many times an image is included in a given page, the browser will simply download the image once and use that. Additionally, most of the time, if the image is included on multiple pages, the browser will still use the same copy of the image it encountered on a previous page instead of re-downloading it!

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Grosseto, Italy
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    perfect then No need to do a script for this

    thank you


Bookmarks

Posting Permissions

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