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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:52:26+00:00 2026-06-16T03:52:26+00:00

We are hosting a PHP application with multiple javascript files. Currently we bust the

  • 0

We are hosting a PHP application with multiple javascript files. Currently we bust the cache by appending a get parameter (timestamp) to the url of the javascript files, ie: http://ourserver.com/scripts/something.js?cachebust=1289438903

As the number of files increase the performance of the application decreases. What are the various solutions we could use to mitigate this problem, from js build systems to apache2 configurations? What options require the least amount of changes in our application code and our current development workflow?

  • 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-16T03:52:27+00:00Added an answer on June 16, 2026 at 3:52 am

    What we do is have a php script that takes the files that need to be minified and combined and creates an url of those. The script does that and also creates a hash of the concatenation of the version numbers of all the files. The hash is appended to the url as a &hash=<hash> parameter. The script generated something like this:

    http://path/to/minifier/script.php?files=core.js,somecode.js,someothercode.js&hash=da39a3ee5e6b4b0d3255bfef95601890afd80709.
    

    This is sent tot the client and the browser does the request. The minifier script takes the parameters, minifies them (or takes them from cache), concatenates them and sends them back. Because the hash is a function of the version of the scripts it will be renewed when one of the files change. And because the version only changes when the file changes no unnecessary cache busts will take place. There are multiple scripts that do this. We use wro4j (in java), but php scripts exist.

    Edit: To be able to bugfix in production we also have a parameters debug=true that will tell the minifier script to not actually minify and just return the concatenated script.

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

Sidebar

Related Questions

So I just switched from some network solutions hosting running some php files that
I followed this tutorial http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/ to install apc on my centos vps hosting but
I am hosting a php application on Windows server 2008 and using SQL Server
I have installed a PHP application onto a shared hosting web server. I am
I need to run a legacy PHP application in a shared hosting environment. I
I am hosting a php application on my virtual Windows server running IIS. The
I've windows hosting and I've developed a php web application, when I'm hosting my
I have an application in php that is intended for shared hosting. So, I
I'm playing with a PHP weblog application using a shared hosting service, as a
About Application I am working on an e-commerce application in PHP. To keep URL's

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.