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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:27:06+00:00 2026-05-12T00:27:06+00:00

The dillema is like this: If I try to fit all the scripts blocks

  • 0

The dillema is like this:

If I try to fit all the scripts blocks on the masterpage (include page in some frameworks), every page gets a copy of every script (including the ones they don’t need) and these quickly adds up and bloats the page size.

If I include/insert script blocks where needed, javascript will be spread all over the project.

I am struggling with where to keep the right balance. Anyone?

  • 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-12T00:27:06+00:00Added an answer on May 12, 2026 at 12:27 am

    We minify, merge and gzip our site wide JS (which is actually about 17 files merged down into two files, one for all our code and one for library code like mootools and clientcide). This greatly reduces the time it takes to download the scripts. Compression and merging are done and the fly and cached on the server so development is not slowed at all. Our total JS for the sitewide goodies is about 50K once all compressed up as above.

    We also set a long expires time on the files, which all have a version number so when we make a change we up the version number (we have a sitewide one to make it easy) and users are forced to get a fresh version and once downloaded they are cached by the browser.

    Additionally to that we have made the move to put our JS at the footer of the page, this allows everything to render out much faster and gives the user something to look at while we download the JS.

    Some individual pages have one off scripts that they need (search forms, etc.) these get the same treatment as above (ie all the files needed would be merged, minified, gzipped) but the sitewide code is left as is so we can make use of the caching. So in this instance we could down load 3 JS files, sitewide, library and custom code for that page(s).

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

Sidebar

Related Questions

Hello I have an array that looks like this, Array ( [cfi_title] => Mr
I'm building a WPF MVVM application and I'd like to keep what I can
This is beyond both making sense and my control. That being said here is
My dilema: In .htaccess in my website's root: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
I guess my previous question wasn't clear enough ( Android: failed to setContentView when
I have got a designing dilema. I have a class named UserAccount that represent
Let me start off by saying Im VERY new to iphone development, but Im
i am in big dilema.. I am working on highly modular web app in
I'm in dilema whether to use windows service for my application or not, below
For my global variables and data I find myself in a dilema as to

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.