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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:06:04+00:00 2026-06-18T00:06:04+00:00

Right now my CSS files look like this: Then I have a php snippet

  • 0

Right now my CSS files look like this:

CSS files

Then I have a php snippet that looks like this:

<?php $Compress->folder(Configuration::get('Public').'/style/',
                        '.css',
                        Configuration::get('Public').'/style.css'); ?>

This minimizes all the css files stored in the directory public_html/style/ (shown in the picture) and creates a file in the directory /public_html/ called style.css. It is run only when needed, although in development, always.

Then I just include the big file: <link rel="stylesheet" href="http://newfutureuniversity.org/style.css" type="text/css" media="screen" >.

I was focused on php development, and now I’m actually starting to develop the design of the site and would like to optimize it. As far as I understand it, the less files the user has to download and the smaller they are, the better (thus my join-and-minimize class). However this raises other question, when there are few page-specific CSS files. Why would my main page have to load the form CSS file? Or the form the main page one? As far as I know, there are 3 main options:

1. Download everything the first time.

The first time the user visites the site, he downloads the whole minimized css file. First time it will be slow, but every other visit it will be much faster. Also it’s much easier to configure.

2. Download the common code the first time and then page-specific code.

Every visit has a medium speed; the first one slightly slower and then the next ones a bit faster but still not the best. First time user downloads 2 files, and the common one is cached for next visit.

3. Every page has different CSS file.

The CSS of each page is the needed CSS plus the page specific, so it cannot be stored in cache. Faster than first time of 2. but slower later on.


I am JUST guessing that it comes down to how many pages the user visits and the amount of page-specific code. If the average user visits 1 or 2 pages, you’d want the 2nd or even 3rd option. However, if the user visits 20 or 30 pages of your site, then you want the 1st option.

So, which method would be better for both the server load and the user latency and why? The page I’m working on needs to be small, since mobile access and remote location access is expected.

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

    Personally, downloading one, large CSS file is preferable to incurring multiple HTTP requests, especially if your web page is being viewed via a browser that only allows two simultaneous HTTP requests per domain. Plus, the style sheet would be cached for subsequent requests.

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

Sidebar

Related Questions

Right now I have a script that will get the last five files in
Right now I use a PHP script to pull together multiple CSS files into
Right now I'm trying to serve CSS and JS files from a server that
Right now I have an upload field while uploads files to the server. The
Right now, I have: RewriteRule ^([^/\.]+)?$ index.php?id=$1 [L] to match any username at the
Right now I have a function, in a class that is used to listen
I have a php script that queries a database for images, and then outputs
I have two CSS files, pic off the problem: this pick shows no caps
Right now I have build a small framework, and I would like to host
I am working on a CSS file that is a total mess right now

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.