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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:45:56+00:00 2026-06-13T16:45:56+00:00

I was wondering if this is something normally done or possible (I am a

  • 0

I was wondering if this is something normally done or possible (I am a novice)
suppose you have kind of a heavy javascripted site. A web app page basically. What if part of the page is a mailbox… and the user doesn’t necessarily use it right away. Could you possibly download the javascript that the mailbox requires after the page has loaded or maybe even as they need to use the mailbox? I saw this from another question:

$.getScript("my_lovely_script.js", function(){

alert("Script loaded and executed.");
  • 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-13T16:45:57+00:00Added an answer on June 13, 2026 at 4:45 pm

    Yes, you can load non-essential scripts “later” to avoid processing them before displaying the initial page.

    There are several approaches:

    1. You can mark the script tag as defer or async (see MDN for details) so the browser will load it asynchronously and not hold up page display for the loading or running of the script.
    2. You can load it dynamically only as needed.
    3. Load scripts at the end of the <body> right before the </body> tag so the page can display before they are loaded.

    Before you proceed down this path, I would highly suggest that you measure the loading resources of your page and find out where the time is really going. Premature optimization before you’ve measured where the time is actually going is rarely the most effective way to improve things. The Chrome debugger can show you a lot of data about resource load times.

    Also, remember that a design that optimizes for effective caching can be highly effective since one your scripts are loaded for the first page on your site, they will be cached for all future pages and will load very, very quickly from the browser disk or memory cache.

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

Sidebar

Related Questions

I was wondering if it was possible to do something like this. I want
I was wondering if it would be possible to do this: $var = '$something
Came across something like this today, and was wondering if there was an equivalent
I was wondering if GWT provides some friendly mechanism to acomplish something as this
I was wondering something. How does this email look when it will be send
Im wondering if I'm doing something wrong, or if this is as good a
Just wondering is this kind of code recommended to increase performance? void functionCalledLotsofTimes() {
I'm wondering if there's a simpler way to do this: Position something centre-screen horizontally
I am not sure this is even possible to be honest, I am wondering
I was just wondering this the other day. I am not exactly sure how

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.