Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8313255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:25:47+00:00 2026-06-08T20:25:47+00:00

Due to reasons that are necessary but difficult to explain here I am setting

  • 0

Due to reasons that are necessary but difficult to explain here I am setting both an absolutely positioned image as well as a background image on a div.

I want to make sure that once the browser has grabbed these images (they’re very large) it doesn’t re-grab them.

Let’s pretend the image bg.jpg in the following code is 500KB. Does the following code cause the browser to download the image in its entirety twice for a total of 1000KB?

<style>
    header {
        background: url(img/bg.jpg) center center fixed transparent;
    }
</style>

<header>
    <img src="img/bg.jpg" width="500" height="500">
</header>

EDIT: Thank you all for your excellent answers. I just wanted to double check and make sure I wasn’t causing the user to re-download these very large images.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:25:50+00:00Added an answer on June 8, 2026 at 8:25 pm

    Browsers are pretty smart when it comes to caching.It should only ask for it once.

    Additionally when it asks the server for an image, it usually sends with the request for the image, a couple of headers that tell the server.. Hey, I want this image, but I got one already that has these attributes that you told me about it last time you sent it to me.

    The server can then respond with a 200 meaning it’s different content 304 meaning the one you have is the same, so I won’t send it again, use the one you got..

    One of these methods uses an ETAG header, but there are a few more.

    Your server needs to support this, but most do.

    Additionally, the interweb is made up of a bunch of caches, which will also look at these sort of header values and return stuff for you.. That’s why the web scales so well 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Due to legacy reasons a lot of our data is stored encoded in standard
Due to unknown reasons since a few days my Plesk server will no longer
due to some unavoidable reasons I need to disable Google Chrome's Chrome PDF Viewer
Due to network or some other reasons, some sites do not have their css
I don't like real-time debugging much, but if it's necessary I'll do it. Is
I have installed about 40 other gems but this one can't install due to
Is the reason you can concatenate a primitive type to a String due to
* Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode
2012-05-31 00:17:51.384 SAMPLEGAME[2901:10703] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SAMPLEGAMEViewController 0x752c140>
What does this mean? * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.