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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:43:15+00:00 2026-06-05T01:43:15+00:00

On an average I have 30-50 lines of javascript specific to the page (it

  • 0

On an average I have 30-50 lines of javascript specific to the page (it is not common). How should I structure my Javascript code so that it gets downloaded in an optimal manner on the client.

If I put that in a common Javascript file then the initial page download will take time because it will even download Javascript code that is not for that page.

If I put it embedded within the page itself then disadvantage is that it is never cached.

How should I structure it in optimal manner? I have round about 30-50 pages in my application.

  • 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-05T01:43:17+00:00Added an answer on June 5, 2026 at 1:43 am

    When developing, use a logic folder structure so you can put all files in a folder and you can find them easier. When in production, concat and minify your code/files and use one reference to that minified file.

    If you want to seperate even in production, think of a way to concat files as much as possible and minify that files. To load files when needed, you can think of a library as RequireJS.

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

Sidebar

Related Questions

Lets say we have an average of one page fault every 20,000,000 instructions, a
I have a LINQ statement that use average on grade, but the problem is
I have been trying to write some code to find the average of numbers
I have the following code to determine the intersection of two 2D lines. It's
I'm trying to simulate some code that I have working with SQL but using
I have a table that has a format along the lines of user data
Say that I have two conditions, 'a' and 'b'. A neuron fires on average
I have a simple general weighed average computation in my SELECT : SELECT ROUND(SUM((G.UnitsAcademic*GD.Grade))/SUM(G.UnitsAcademic),3)
I have sales statistic data in array form to calc standard deviation or average
I have a database with 6500 players and each player has an average of

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.