Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

thanks

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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