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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:45:30+00:00 2026-05-18T05:45:30+00:00

Background: I prefer to keep all my CSS and Javascript in separate .css/.js files.

  • 0

Background: I prefer to keep all my CSS and Javascript in separate .css/.js files. (Reason is that they are shared by many pages so in this way, static data in those file would not get transferred with each page view). This leads to some pages having 5-6 “link rel” or “script type” statements.

Now, normally, this would mean that browser would make separate request for each of those css/js files, and effective page load time can increase – say become 5X for 5 round trip requests (please correct me if I am wrong here).

My question is:

1) Do modern browsers request keep-alive connections by default?

2) If they do, then does it mean that additional file sourcing (css/js) will not increase the effective load time? For example – will the server assume that browser is going to request the css/js files, and hence keep sending it (thus avoiding an extra request)?

In short – can anyone explain when would the load time NOT increase by having separate css/js files and if it always increases, then is the load time increase proportional to the number of files included?

regards,

JP

  • 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-18T05:45:31+00:00Added an answer on May 18, 2026 at 5:45 am
    1. Yes, browsers using HTTP/1.1 should generally be using keep-alive connections.

    2. The server won’t necessarily assume it; the keep-alive should mean there isn’t a separate DNS lookup – the file still gets requested.

    If properly configured, you should find (which can be verified with Firefox+Firebug for example) that the first request generates a normal download of those files, but subsequent requests generate HTTP 304 (File Not Modified) requests where the content has not changed since the last load and as such it should be available from cache.

    If it is a real concern, you may want to look into using Expires headers to specify long-life of the files, so the request never even gets made (not even the request to see if the file has changed)

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

Sidebar

Related Questions

Coming from a Perl background, I have to say I prefer cpan Foo::Bar to
Background: At my company we are developing a bunch applications that are using the
I prefer dark backgrounds for coding, and I've downloaded a jar file containing an
Background: I have a little video playing app with a UI inspired by the
Background: Some time ago, I built a system for recording and categorizing application crashes
Background: I need to reserve an amount of memory below 0xA0000 prior to my
Background I am writing and using a very simple CGI-based (Perl) content management tool
Background I have a massive db for a SharePoint site collection. It is 130GB
Background I am trying to create a copy of a business object I have
Background: Over the next month, I'll be giving three talks about or at least

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.