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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:47:06+00:00 2026-05-20T18:47:06+00:00

In my build (for a complex webapp), I’ve aggregated all the javascript into 1

  • 0

In my build (for a complex webapp), I’ve aggregated all the javascript into 1 file, which I’m loading as script.js

I thought I might go even further and just print all the js into html. Are there any reasons I should not do that? My thinking is… why not just save the request?

The only downsides I’m aware of are:
I understand that since the js is pretty huge, the initial page load might get slowed down.

I’m not very concerned about that since the page is empty anyway without javascript.

Also the script.js could be cached. If I wanted to cache the script within the html, I would have to use varnish or the like.

What are some reasons why I should not do this? Thanks.

Edit: I forgot to mention that this is a 1 page javascript app, so every single page has the same javascript (and html).

  • 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-20T18:47:07+00:00Added an answer on May 20, 2026 at 6:47 pm

    I use one single minified external js file. As a seperate file it can be cached nicely, although an extra HTTP request is needed.

    If you put your java script inline then it wont be cached as simply and you will have duplication of code on every page if you are reusing methods that are inline.

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

Sidebar

Related Questions

I'm embedding MSBuild directly into a more complex build tool. The relevant code looks
if I want to build a complex webiste like google news , which gathers
I'm using VS2010 and TFS to build a complex medium sized website. Which protocol
I have a fairly long and complex build automation script. From a configuration management
I'm taking over a couple of projects with fairly complex build.xml files. Which tool
Context: So, I am attempting to build a ridiculously complex domain model. Talking with
Any thoughts on using Flex to build an RIA for administering a complex rails
I am using ASP.NET MVC. My requirement is to build a complex object (an
I'm new to Rails and trying to understand how we build 'complex' Models (and
I feel the two languages are not enough to rapid build complex but high

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.