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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:38:14+00:00 2026-05-10T21:38:14+00:00

Duplicate of: Use javascript to inject script references as needed? Javascript doesn’t have any

  • 0

Duplicate of: Use javascript to inject script references as needed?

Javascript doesn’t have any directive to ‘include’ or ‘import’ another js file. This means that if script1.js uses functions/objects defined in script2.js, then every html page that includes script1.js must include script2.js before it.

This shouldn’t be a big problem if you only have 2 js files in like 10 html pages. I mean, it’s manageable then!

But say suddenly you change script1.js and improve it by using functions/objects defined in a new file, script3.js
The problem is, you can’t just tell script1.js to include script3.js, instead, you have to remember every html file that included script1.js and update it to include script3.js as well!

This seems like rather stupid way of organizing code.

Are there recommended strategies or practices to deal with this issue?

Would it be acceptable to have a gigantic js file that holds all the functionality that you use across the website?

  • 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. 2026-05-10T21:38:14+00:00Added an answer on May 10, 2026 at 9:38 pm

    Use dynamic includes:

    Use javascript to inject script references as needed?

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

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 67k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer 'Better' is quite circumstancial here. Remoting's uses Binary Serialization so… May 11, 2026 at 11:42 am
  • added an answer Bear in mind that The list would only be on… May 11, 2026 at 11:42 am
  • added an answer At risk of not answering the question at all... You… May 11, 2026 at 11:42 am

Related Questions

Duplicate of: Use javascript to inject script references as needed? Javascript doesn't have any
Duplicate of: When/Why to use Cascading in SQL Server? I've always been too scared
Possible Duplicate: When to use “strictfp” keyword in java? What is the use of
Duplicate: Tables instead of DIVs and Why not use tables for layout in HTML?
Duplicate Of : Find node clicked under context menu I've got a context menu
Duplicate of 249087 I have a bunch of user generated addresses that may contain
Duplicate of Disable browser save password functionality Is there a way to tell the
Duplicate of: In Python, how do I get the path and name of the
Duplicate of How to program a fractal What are fractals? Is this is one
Duplicate of What's the BEST way to remove the time portion of a datetime

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.