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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:31:59+00:00 2026-06-13T08:31:59+00:00

I need to execute some scripts when all the resources on my domain and

  • 0

I need to execute some scripts when all the resources on my domain and subdomain are loaded, so I did this:

$(window).load(function(){
  // al my functions here...
}

The problem is that there are some external resources (not on my domain and subdomain) that sometimes take longer to load. Is there a way to exclude external resources from the load event?

EDIT:
I was hoping to do something like:

$(window).not(".idontcare").load(function()

but it’s not working

  • 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-13T08:32:00+00:00Added an answer on June 13, 2026 at 8:32 am

    I guess your external resources rely on a src attribute.

    If so, in your page source code you could set the src attribute of the resources you don’t want to wait for, not as src but as external_src.

    Then you could easily do:

    $(document).ready(function(){
    
        $(window).load(function(){
            // all your functions here...
        });
    
        $('[external_src]').each(function() {
    
            var external_src = $(this).attr("external_src");
    
            $(this).attr("src", external_src); // now it starts to load
            $(this).removeAttr("external_src"); // keep your DOM clean
    
            //Or just one line:
            //$(this).attr("src", $(this).attr("external_src")).removeAttr("external_src");
    
        });
    
    });
    

    This way the external resources should start loading as soon as just the DOM is ready, without waiting for the full window load.

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

Sidebar

Related Questions

I have a bash script which need to execute some php scripts and to
I need execute some code before Windows shutdown process each time. So, I want
I need to execute some commands in batch mode (e.g., via Rscript). They work
I'm trying to execute a few python scripts in order to manipulate some images
I came across this tutorial to understand how to execute SQL scripts with GO
I want to execute some code right before the layout is rendered, after all
I need to execute a specific function mvFinishItUp() when two conditions are met. More
I need execute an SQL query in ORACLE it takes a certain amount of
I need to execute a subquery in a select clause with Apache Openjpa 2.
I need to execute code at intervals, sometimes 10 seconds, sometimes 5 minutes. 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.