Static Asset Versioning
Provides hashes for static assets
Description
This extension will provide a sha1 hash of your static assets in the XML. In a way it is similar to the Asset Compiler
extension, except that it does not alter your output, so it can also be used with require.js
or script.js
.
As a sample, this is the output when the folders workspace/js
and workspace/css
are selected, and Twitter's bootstrap is used (css is concatenated):
<assets> <js> <app-ck.js>77d68d889</app-ck.js> <app.js>1a3ac2a00</app.js> <bootstrap-alert.js>9cfbeb5d6</bootstrap-alert.js> <bootstrap-button.js>a8f204c81</bootstrap-button.js> <bootstrap-carousel.js>265e52c5f</bootstrap-carousel.js> <bootstrap-collapse.js>320469b1c</bootstrap-collapse.js> <bootstrap-dropdown.js>2664c0490</bootstrap-dropdown.js> <bootstrap-modal.js>e12c769aa</bootstrap-modal.js> <bootstrap-popover.js>99aee04c5</bootstrap-popover.js> <bootstrap-scrollspy.js>bd739439a</bootstrap-scrollspy.js> <bootstrap-tab.js>8b3264cc1</bootstrap-tab.js> <bootstrap-tooltip.js>b9809fcb0</bootstrap-tooltip.js> <bootstrap-transition.js>aa978472d</bootstrap-transition.js> <bootstrap-typeahead.js>01f6c6fab</bootstrap-typeahead.js> <carousel.js>c01d4b6d4</carousel.js> <flickr-widget.js>acdac461d</flickr-widget.js> <paginate-ck.js>6788645c4</paginate-ck.js> <paginate.js>ec9b205bd</paginate.js> <twitter-ck.js>25429fa03</twitter-ck.js> <twitter.js>20ecf0567</twitter.js> </js> <css> <style.css>53b2ef39e</style.css> </css> </assets>
This extension does not compile, minify, concatenate or do anything else with your assets, it will just provide you with enough information to ensure your visitors always see the latest stylesheets or scripts, even if you have an agressive cache in place.