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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:33:39+00:00 2026-05-27T04:33:39+00:00

Say I have the following setup: Page1.html Includes master.css, page1.css and page1.js Page2.html Includes

  • 0

Say I have the following setup:

Page1.html

  • Includes master.css, page1.css and page1.js

Page2.html

  • Includes master.css, page2.css and page2.js

I have been told that merging the two js and additional css files would be better for caching? But wouldn’t the separate files be cached as well? I don’t see how this makes a difference (aside from maintainability maybe – personally I like the separation).

what is the most perform-ant and most sensible way to organize something like this?

Disclaimer:: Micro optimization is not the issue here – I would like to know what the best practices are before I begin my project so I do not have to revisit this later.

  • 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-27T04:33:40+00:00Added an answer on May 27, 2026 at 4:33 am

    The benefit would be:

    If the user visits Page1, then Page2, their browser would fetch:

    Page1.html
    -> master.css
    -> page1.css
    -> page1.js
    

    Then, some time later:

    Page2.html
    -> [ no need to re-fetch cached items ]
    

    If the page1.css <-> page2.css and page1.js <-> page2.js are substantially similar, that could (worst-case) save two DNS look-ups, and two HTTP negotiations, which could be fairly slow.

    At the very least, you’re possibly saving having to “listen to” about 1KiB of incoming HTTP headers twice for page2.css and page2.js. (Although all the major browsers will likely chain those requests together.)

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

Sidebar

Related Questions

Let's say you have the following setup. You have a server with the basepath
Let's say we have the following setup: public class ClassA { public event EventHandler
Lets say I have the following setup: .... UISwitch gpsSwitch; // the below object
Let's say I have the following setup class A { B foo(); } class
So let's say I have the following setup in Google Reader Folder One Engadget
Say we have the following development setup: Team 1 in location A with a
Let's say we have following this: <p class=first>This is paragraph 1.</p> <p class=second>This is
Say we have the following method: private MyObject foo = new MyObject(); // and
Say I have the following file structure: app/ app.py controllers/ __init__.py project.py plugin.py If
Say I have the following class MyComponent : IMyComponent { public MyComponent(int start_at) {...}

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.