2

Having a problem with stale css and js files being cached in the browser.

I am using the cache-buster technique of appending a query parameter with a datestamp to static resource url's named explicitly in the main site template.

However I now need to use a similar technique (appending revision number instead of datestamp), but now for all css and js files including library files.

I am still learning TurboGears and have scoured the docs, but I can't see a simple way to accomplish the append (for all static resources). Any pointers?

This is a legacy Turbogears 1.0b1 application which may be upgraded to Django at some point.

ian
  • 83
  • 4
  • Welcome to SO! A `file.js?v=1.1` type scenario would work and revise at various future points. Using the timestamp option is best used in dev/staging than production environments. – nickhar Oct 26 '12 at 00:34
  • Good point Nickar. My main challenge now is to understand how TG packages up js files and how the suffix can be most easily added. – ian Oct 26 '12 at 14:53

0 Answers0