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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:31:47+00:00 2026-05-31T05:31:47+00:00

At the moment, I include about 8 JavaScript files with various classes and functions

  • 0

At the moment, I include about 8 JavaScript files with various classes and functions within them. I cannot help but feel I am doing this all wrong. Should I include only some kind of basic thin client JavaScript and then get functions in the other files ad-hoc? Can I reference JavaScript code on my server from the JavaScript code currently in the user’s browser?

Google for their calendar or mail obviously don’t download all the JavaScript they need to operate so how do they reference the files they need from the server? Leaving the majority of files on my server would also have the advantage that I would not need to get the user to refresh the browser or log back in again when I update the functionality or fix bugs. how do other people get users to update their web apps?

Also, does anyone have any suggestion on how to secure my scripts?

  • 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-05-31T05:31:48+00:00Added an answer on May 31, 2026 at 5:31 am

    If you have many script files, but they all contribute to the same functionality then concatenate and compress them into one file.

    When you serve your one file help clients know to not cache it (if it changes often) by adding a query string to it (either random or a version of the file).

    <script type="text/javascript" src="file.js?<%=DateTime.Now.Ticks.ToString() %>"></script>
    
    <script type="text/javascript" src="file.js?<%=Globals.JS_COMPILED_VERSION %>"></script>
    

    You can handle your multiple JS files at build time with a simple shell or batch file. It would concatenating the files then depending on whether you are in RELEASE or DEBUG compress the large file with a JavaScript optimizer.

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

Sidebar

Related Questions

I'm doing my best to learn DDD, but I'm unsure about some really basic
At the moment we use HSQLDB as an embedded database, but we search for
At the moment, our application uses the Trident Win32 component, but we want to
I am using about a dozen XSLT files to provide a large number of
I'm fairly new to C++, but my understanding is that a #include statement will
I have about a 2000 line functions file, and I have realized I can
i'm just beignning to learn about structs and seperating things into different files. At
I've just had a massive *blonde moment** , but it's highlighted an annoyance I
So I am doing this as a learning moment and I'm not afraid to
At moment I want to implement picture upload without using any plug-ins. My upload

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.