Forum OpenACS Development: Re: css and js versioning by url to avoid caching old ones
I would recommend to combine this effort with the following items: a) use expires header (via e.g. "ns_setexpires 300000") for css and js files (and maybe static images like icons as well) b) add versioning via file-names (e.g. lists-5-3.css). when the files change in a local release, the numbers should increment, when using pattern like *-5-3.css, it can be automated The advantage of this approach is that the user experience is much better, once the pages are cached. The site appears much quicker, oacs has to serve much less simple requests. Due to the exipires header, the static files do not have to be validated and the page load latency is significantly reduced. For more background information, see http://open.yahoo.com/performance/rules.html#expires We are using expires setting in learn@WU since at least half a year with very good success (modified the request processor to serve "resources" with a three hours expires). -gustaf neumann
Any experience with Etags?
Versioning of CSS & .js might be better with numbers as suggested in yahoo best practices, while the approach that Miguel suggest is more suitable for dynamic components (yahoo again). Anyway, certainly we need to adopt versioning in order to smoothly introduce any changes in css / .js in production sites.
BTW, anyone with idea on how headers flush can be acomplished?
Once I had fixed all bugs, I could export that work to oacs 5.4 with its new templating system.
Gustaf, about "add versioning via file-name", it forces to rename files in CVS, doesn't it? or maybe it's a link to real filename?.