If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Dec 2015
    Member #
    1 times

    Is a repeated background-image calling more than one HTTP server request?

    When you have a background defined by something like:

    body {
        background-image: url(someimg.jpg);
        background-size: 100px 100px;
        background-repeat: repeat;
    Say your page has 1,000,000 pixels, does that mean that the image above was called 100 times? Or is it stored and then used 100 times to cover the whole page?


  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Not from USA
    Member #
    2784 times
    Stored and used 100 times. That's what the "repeat" does. If your page was 1000 x 1000 pixels, your background would repeat 10 x 10 times.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member Krazyhawk's Avatar
    Join Date
    Feb 2016
    IL, USA
    Member #
    7 times
    Since browsers are keen on jumping all over any opportunity to cache, I would have to say that the image is downloaded once during the background image call, and used via cache for the repeat. But, I don't really have a source, just a hunch

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 07:43 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: