Issue Bug Closed

#89086Third party extension requireJS modules are cached by browsers despite version update

Benjamin Franzke 09/05/19, 08:44 updated 12/23/19, 22:57

Description

An Extension that contains requireJS modules in Resources/Public/JavaScript and includes a module in the backend using

    $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/ExtensionName/JavascriptModule');

can not update the JavascriptModule on extension updates, as the TYPO3 PageRenderer calculates a cache busting hash (for all requireJS modules)
from the current TYPO3_version and project path. Third party extension version are not taken into account.

That means a cache bust parameter, e.g “abcdefghijklmnopqrstuvwxyz1234567890abcdef” would be applies to the url:

/typo3conf/ext/extension_name/Resources/Public/JavaScript/JavascriptModule.js?bust=abcdefghijklmnopqrstuvwxyz1234567890abcdef

…but that hash is not changed when the Extension Version changes.

Note: For performance reasons only the extension version number should be taken into account. (File modification times would only be important for development scenarios where a separate development cache parameter override is available).

Reviews 2