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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:40:21+00:00 2026-05-16T17:40:21+00:00

When minifying JavaScripts together in web-development, is it better from the user-loading-time point of

  • 0

When minifying JavaScripts together in web-development, is it better from the user-loading-time point of view to:

  1. make one single big bundle of JavaScript containing all the script, and include this on each page – so each page will probably not need all of it, but once the user has it cached, they don’t need to get any further scripts (until it expires from their cache, of course) – optimising for number-of-requests
  2. make one bundle of JavaScript per page, so that each page loads just the script that it needs and nothing else – so each page when first loaded will definitely require a JS request (but still subsequently have that cached. Optimising for size-of-requests.

I’m interested in some data upon which to base the decision for which strategy to go with. I can arrive at conclusions based on anecdote as easily as everyone else 🙂

  • 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-16T17:40:22+00:00Added an answer on May 16, 2026 at 5:40 pm

    It really depends on the sizes and functions of the script. It’s common to have a single master.js for all your pages, which contains all the functionality required by every page of your site, whilst having other js files for functionality that might only be needed on certain pages.

    Take Stack Overflow, for instance. They have a master.js file included on every page of the site, but when you visit a question page or the “ask a question” page you’ll notice wmd.js. This script includes all the functionality for the editor which is needed on fewer pages.

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

Sidebar

Related Questions

I'm trying to use Python to concatenate a few javascript files together before minifying
Why do people suggest minifying web assets, such as CSS and JavaScript, but they
I'm trying to use http://blogs.msdn.com/b/cdndevs/archive/2012/01/23/javascript-and-css-minifying-bundling-with-the-microsoft-web-optimization-nuget-package.aspx To minify and bundle my css and js files
I'm trying to use SquishIt for minifying CSS and Javascripts in ASP.NET MVC 3
I wrote a widget that includes javascript from one site, on another. The code
Google Web Toolkit (GWT) performs inlining of javascript code, minifying and removing unused code,
Has anyone successfully tried minifying AND concatenating all the jqGrid locale files so that
Is there some valid purpose to minifying before compressing? It seems highly unlikely that
I've downloaded jquery-ui to my webapp which has a build.xml for compressing and minifying.
Modifying CKEditor 3.6.2 is not easy, but I tried hard . One problem that

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.