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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:41:17+00:00 2026-06-13T21:41:17+00:00

I just read this SE Post where it explains the question asked is similar

  • 0

I just read this SE Post where it explains the question asked is similar to what I’m asking. Yslow recommends combining all of your external javascripts, if possible. I’ve actually taken internal javascripts and made them into an external .js file and put it in my /scripts folder, per some recommendation I found on some website. But this leads me to my 2 (similar) questions; I didn’t think separate posts were needed.

(1) – How would I combine javascript codes? Just leave a blank line and then copy and paste the other javascript after the other, and so on, until it’s all in one file?

(2) – I have an asp.net website with 5 master pages. 4 of the 5 have 6 javascript files (all minified, some on my own using some compression tool that worked). But I read on a SE post and online that you should load the script(s) after page load. How do you do this on an asp.net website? All my .js files are in the

@bluesmoon gave a nice, thorough answer, but I wasn’t able to comprehend it:

To load a script after page load, do something like this:

// This function should be attached to your onload handler
// it assumes a variable named script_url exists.  You could easily
// extend it to use an array of scripts or figure it out some other
// way (see note late)
function lazy_load() {
    setTimeout(function() {
            var s = document.createElement("script");
            s.src=script_url;
            document.body.appendChild(s);
        }, 50);
}

This is called from onload, and sets a timeout for 50ms later at which point it will 
add a new script node to the document's body. The script will start downloading after 
that. Now since javascript is single threaded, the timeout will only fire after onload 
has completed even if onload takes more than 50ms to complete.

I don’t really understand what he’s saying or how to go about implementing it. So that’s all … I just need help in combining javascripts and loading them (or it) after page load; I don’t see anything saying “onload” in my master pages or .aspx pages. Thank you for any help or guidance anybody can offer me!

  • 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-13T21:41:19+00:00Added an answer on June 13, 2026 at 9:41 pm

    Take a look at Cassette and render your bundles just before your closing body tag

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

Sidebar

Related Questions

I just read this question and stumbled upon the following quote: Scala treats ==
I just read this post about adding buttons with a loop programmatically . I
I just read this post and i wonder if there is something like this
I've just read this post about Panic/Recover in Go and I'm not clear on
I just read this blog post about a recipe to lazily initialize an object
I just read this blog post and it stated that: Google is now working
I just read this post about really nasty (and cool at the same time)
I just read this blog post on Razor Templating in ASP.NET MVC 3. Put
I just read this quite interesting post about security for CakePHP: Cakephp Security It
I just read this post and it makes the case against implicit typing using

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.