forkcms/forkcms — pull request #659 by bart-lysander (2014-02-19 10:16:59+00:00)
Title: Prevent browsers from caching updated minified files

Problem:
On a production website, end users often need to refresh a page or clear local browser cache to see the last changes the developer has made to a stylesheet or javascript file.

Cause:
A minified file is named by a md5 sum taken from the original file name.
When the data in the original file is updated the contents of the minified file is rebuild, but it uses the same minified file name.
Modern browsers will not reload this updated content, they use a cached version.

Solution:
Include the modified time stamp of the original file in the md5 sum.
This will result in a different minified file name.
This will make the browser load the updated minified content.

Note:
This update makes the $addTimestamp parameter of the addCSS and addJS functions of no use anymore. But because it is not used by default I left it alone.