This is a follow up question on the following question What's the best way to version CSS and JS URLs

Both of the solutions mentioned there would require modification to the files where the css and js file URLs are mentioned. So in effect it would require a restart of the application server after making the changes.

Is there a better way, where versioning of static files can be handled without having to restart the Application server ?

the following is ruled out in the solution

  • changing the css and js filenames
  • passing a query paremeter in the url
  • the solution also should not affect setting cache-control or expires.



Google's Apache module mod_pagespeed will automatically add a hash of the file to the path, to prevent old versions from the cache being used.

  • If I have my static files on Amazon cloudfront and have the files URLs mentioned in my code. Will pagespeed still be able to add the hash of the file to the path ? – Santhosh S Jan 24 '11 at 7:40
  • I doubt it, because it would have no way to hash the files. You'll need to have your HTML and your CSS/JS files served by the same Apache instance for this to work. – Mike Scott Jan 24 '11 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.