The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other css sprite image is called more that one time in page

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #182837

    Hi. I used css image sprite for my website. In the home page I am using images for logo and etc. In this case logo is in the anchor tag. sprite image is using for 5 images in the home page. When the page is loading , sprite image is called two times. Because I used sprite image as a background for anchor tag of the logo. Without anchor tag , sprite image is called only one time. I need put anchor tag for logo. How to solve the sprite issue. when I load the home page it takes too long for loading for the sprite image two times calling. If it is called only once, then the loading time is reduced.

    .logo-home a
    background:url(/content/images/sprite.jpg) no-repeat scroll center 0px;

    img.home-students-image {
    width: 227px;
    height: 93px;
    background: url(/Content/images/sprite.jpg) no-repeat scroll -211px -365px;

    Gary Pickles

    Hi Kvr,

    The first time the images is used it will be downloaded from the internet, any further times you use the image it will be loaded form the cache, so won’t be downloaded again.



    Typo? Try giving both images the same URL.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.