summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9a198c8)
As most files are loaded via RequireJS now, the configuration
needs to add a GET parameter in order to avoid browser caching
of changed JavaScript files.
For development environments the current timestamp is added. For
other environments / application contexts a hash based on the
TYPO3_version is added, allowing to have end-users to fetch
the latest version after e.g. TYPO3 has been updated.
Resolves: #68133
Releases: master
Change-Id: Ifbc13cafe519a2a83f51c3869a028028f3b24368
Reviewed-on: http://review.typo3.org/41219
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
// load all paths to map to package names / namespaces
if (empty($this->requireJsConfig)) {
// load all paths to map to package names / namespaces
if (empty($this->requireJsConfig)) {
+ // In order to avoid browser caching of JS files, adding a GET parameter to the files loaded via requireJS
+ if (GeneralUtility::getApplicationContext()->isDevelopment()) {
+ $this->requireJsConfig['urlArgs'] = 'bust=' . $GLOBALS['EXEC_TIME'];
+ } else {
+ $this->requireJsConfig['urlArgs'] = 'bust=' . GeneralUtility::shortMD5(TYPO3_version . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
+ }
// first, load all paths for the namespaces, and configure contrib libs.
$this->requireJsConfig['paths'] = array(
'jquery-ui' => $this->backPath . 'sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui',
// first, load all paths for the namespaces, and configure contrib libs.
$this->requireJsConfig['paths'] = array(
'jquery-ui' => $this->backPath . 'sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui',