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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:34:01+00:00 2026-06-09T04:34:01+00:00

I noticed some time ago that many big sites sometimes serve their CSS and

  • 0

I noticed some time ago that many big sites sometimes serve their CSS and JS files in a surprisingly small number (even one single file) and with strange alphanumeric names. What I thought was that these filenames were hashes, which in turn lead me to suspect that:

  • They were cached
  • They were dynamically created to reduce the amount of HTTP overheads from various CSS and JS “bits”

Some internet research showed me that I was right and this approach is somewhat existent and valued, and I would like to implement it in a WAMP/LAMP site I’m developing – a site that, for its modular plugin structure, serves often a lot of tiny and medium-sized CSS and JS files.


These are my questions:

  1. how can I update the cache automatically on file update? The solution I came up with was to create a sort of “signature string” for every page, joining the file paths AND the last modification time, then hash the signature with MD5 and feed it to the cache to determine if the hash/filename is existent. Is it a correct approach? any drawbacks?
  2. the next logical step would be minification. Minifying CSS files is rather simple; is JS minification reliable too? Any good class out on the internet?
  3. another problem: what about already minified scripts? The only solution aside some form of parsing I thought of was to compare size before and after minification, if size after < size before then use the PHP-minified form. Computational overhead should be solved by caching, right?
  4. The most important issue: CSS images. Here I really don’t have a clue: collecting various CSS in different places breaks all the relative image links. I cannot use absolute paths (break site relocability). I’d prefer not using a standard directory structure for CSS images (f.ex. placing all CSS referenced images under a css/img dir) because of potential filename conflicts. This would mean also parsing the CSS in some way. How can I solve this?
  5. Compression: do I have to implement always a software PHP based GZIP compression, or (very ignorant in that field) can it be enforced automatically on an Apache server?

Thank you for your attention.

  • 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-09T04:34:04+00:00Added an answer on June 9, 2026 at 4:34 am

    I using is a very good library https://github.com/mrclay/minify for this. Its library automaticaly minify css and js files into one file and rebuild cache on modification files.

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

Sidebar

Related Questions

quite some time ago i noticed that in Visual C++ 10 ADL fails when
I'm on a WinXP Pro SP3 box. Some time ago, I noticed that opening
I've noticed, that every time I compact my CouchDB instance after inserting some stuff,
I have been using php from some time and I have noticed that it
While writing a Javascript inheritance function some time ago I noticed some very strange
For some time I noticed that MySQL would append comments to InnoDB tables that
Some years ago I created a small website in PHP that now has grown
I learned some time ago about Decision Trees and Decision tables. I feel that
I have a MySQL database that runs for some time now with many changes
For past some time I have noticed that we get ORA-00054 error while trying

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.