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

  • Home
  • SEARCH
  • 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 7872435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:12:00+00:00 2026-06-03T02:12:00+00:00

In the jQuery docs for the load event http://api.jquery.com/load-event/ , it says Can cease

  • 0

In the jQuery docs for the load event http://api.jquery.com/load-event/, it says
Can cease to fire for images that already live in the browser's cache. Is any more information available on this, such as what browsers it affects, and in what situations?

  • 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-03T02:12:01+00:00Added an answer on June 3, 2026 at 2:12 am

    I’m not sure what browsers are affected, but it is easy to check for.

    var img = new Image();
    img.src = "foo.jpg";
    if (img.complete || img.readyState === 4) {
        // image is cached
        doneCallback();
    }
    else {
        $(img).on('load',doneCallback);
    }
    

    UPDATE

    If you change the code around, it will consistently fire a load event in all browsers.

    var img = new Image();
    $(img).load(doneCallback);
    img.src = "foo.jpg";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's an example taken from http://docs.jquery.com/API/1.1/AJAX#.24.post.28_url.2C_params.2C_callback_.29 $.ajax({ type: POST, url: some.php, data: name=John&location=Boston, success:
I'm using jquery tabs ( http://docs.jquery.com/UI/API/1.7.2/Tabs ). Jquery version 1.3.2 and Jquery UI version
I'm using a jQuery plugin called qTip (http://craigsworks.com/projects/qtip/docs/api/#callbacks) and trying to implement a callback
I'm using this jQuery Full Calendar: http://arshaw.com/fullcalendar/ According to their documentation, I can load
I'm using the JQuery tooltip plugin - http://docs.jquery.com/Plugins/Tooltip With the basic implementation: $(.tooltip).tooltip(); Instead
I'm trying to use the autocomplete plugin for jQuery (this one http://docs.jquery.com/Plugins/Autocomplete ). My
All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a
I am using jQuery 1.7.1, jQuery Validations plugin (http://docs.jquery.com/Plugins/Validation) 1.9.0, jQuery SimpleModal plugin (http://www.ericmmartin.com/projects/simplemodal/)
I've been looking over the jQuery docs and it indicates that .load is a
I was looking at http://docs.jquery.com/Plugins/Authoring#Defaults_and_Options to create a simple plugin for jQuery. Following the

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.