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 6604709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:11:36+00:00 2026-05-25T19:11:36+00:00

There are a lot of pre-load script examples available on stack overflow but is

  • 0

There are a lot of pre-load script examples available on stack overflow but is there a way to check if the browser already has the image preloaded in it’s cache and if it is then do not initiate/overtake the image pre-loading with the .load() function and just let the browser put in the image?

  • 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-05-25T19:11:36+00:00Added an answer on May 25, 2026 at 7:11 pm

    I don’t think so, but more importantly if your browser already has the image, it won’t try to reload it anyways (it will just ask the server for the headers and see that the image hasn’t changed).

    If you want, you can put ‘far futures expires’ headers on the images, so the browser doesn’t even try to check the server and just assumes any images it has in its cache are okay. This would effectively do what you asked.

    I think Yahoo says it better than I can:

    Browsers (and proxies) use a cache to reduce the number and size of
    HTTP requests, making web pages load faster. A web server uses the
    Expires header in the HTTP response to tell the client how long a
    component can be cached. This is a far future Expires header, telling
    the browser that this response won’t be stale until April 15, 2010.
    Expires: Thu, 15 Apr 2010 20:00:00 GMT

    If your server is Apache, use the ExpiresDefault directive to set an
    expiration date relative to the current date. This example of the
    ExpiresDefault directive sets the Expires date 10 years out from the
    time of the request.
    ExpiresDefault “access plus 10 years”

    Keep in mind, if you use a far future Expires header you have to
    change the component’s filename whenever the component changes. At
    Yahoo! we often make this step part of the build process: a version
    number is embedded in the component’s filename, for example,
    yahoo_2.0.6.js.

    So basically, you can put the header Expires: Thu, 31 Dec 2030 0:00:00 GMT and the browser won’t go looking for the image again for another 29 years or so : ). Of course this means if you change the images, you’ll have to rename them.

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

Sidebar

Related Questions

There are a lot of webs still using classic ASP instead of ASP.NET but
Is there a way to test if a collection is already initialized? try-catch only?
There is a lot of posts about nested Ajax problems, but I can't figure
There are a lot of SO questions which are similar to this, but I
WebKit has a lot of pre-processor lines like this: #if MACRO1(MACRO2) For example: #if
Please let me know why there is lot of white space below the page
From time to time my applications GUI stops redrawing. There a lot of threads
Can someone post any simple explanation of cache aware algorithms? There are lot of
There is a lot of information out there on object-relational mappers and how to
There is a lot of buzz about Microsoft Silverlight , especially after the Olympics.

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.