I have some js files which have temporary string at the end, the problem is that jQuery is already loaded before so it cause issues.

<script src="www.example.com/media/system/js/core.js?c053e5a315af285403fcc2192089780b" type="text/javascript"></script>
<!--[if lt IE 9]><script src="www.example.com/media/system/js/polyfill.event.js?c053e5a315af285403fcc2192089780b" type="text/javascript"></script><![endif]-->
<script src="www.example.com/media/system/js/keepalive.js?c053e5a315af285403fcc2192089780b" type="text/javascript"></script>
<script src="www.example.com/media/jui/js/jquery.min.js?c053e5a315af285403fcc2192089780b" type="text/javascript"></script>
<script src="www.example.com/media/jui/js/jquery-noconflict.js?c053e5a315af285403fcc2192089780b" type="text/javascript"></script>
<script src="www.example.com/media/jui/js/jquery-migrate.min.js?c053e5a315af285403fcc2192089780b" type="text/javascript"></script>

My template have rules to remove the jquery loaded above, but it can't work :

// Rules to remove predefined jQuery and Bootstrap and MooTools More
GKParser::$customRules['/<script src="(.*?)media\/jui\/js\/jquery.min.js" type="text\/javascript"><\/script>/mi'] = '';
GKParser::$customRules['/<script src="(.*?)media\/jui\/js\/jquery-noconflict.js" type="text\/javascript"><\/script>/mi'] = '';
GKParser::$customRules['/<script src="(.*?)media\/jui\/js\/bootstrap.min.js" type="text\/javascript"><\/script>/mi'] = '';

What thing can add this string at the end of some js files ?

Thanks by advance


The strings are added by Joomla: method_addScriptVersion. You may find this plugin usefull to remove scribts etc.: kubik-rubik, jcc-js-css-control

| improve this answer | |
  • Issue in older Joomla versions link – CE WebDesign München Sep 19 '17 at 15:30
  • I have installed this plugin and configured it, it make the job. Thanks – user3533235 Sep 20 '17 at 11:54

Most likely a plugin would do that, such as JCH Optimize. The strings are added at the end to ensure that the browsers always grab a fresh version of these files (and not use a cached version). Check JCH Optimize (and any other JS/CSS compression/optimization extension installed that you have) on how to disable that.

Additionally, some templates may also do the same thing, also check your template settings.

If you're still not sure what's causing it, then do the following:

  • Switch to a different template and see if the problem is no more. If the problem disappears, then the problem is in your template.
  • Disable your plugins one by one (starting with the one with the highest ID) until the problem is no more.
| improve this answer | |
  • Thanks for the answer, i don't use JCH Optimize. I have checked in all plugins and i didn't found a plugin like JCH Optimize. I have switched to protostar as default template but it adds too these strings at the end of files. – user3533235 Sep 19 '17 at 9:54
  • Then there must be another plugin doing this. Disable your plugins one by one until you find the culprit. – itoctopus Sep 19 '17 at 11:14
  • I have just done a clean install of Joomla! 3.7.5, without installing anything. And for all js and css, it adds string at the end. Something has changed into Joomla! but i don't what – user3533235 Sep 19 '17 at 11:45
  • By disabling all plugins enabled, it still does the same thing. This behaviour has changed since J! 3.6.x or maybe J!3.7.x – user3533235 Sep 19 '17 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.