In the Magento backend, under System -> Configuration -> Advanced -> Developer -> JavaScript Settings -> Merge JavaScript Files
, I set the field value to yes and enabled the Magento merge js. However, by activating this resource, the pages end up having changes in the load and its functionality, since one of the links containing the mined script has the defer
parameter, which ends up loading the script after the page is already loaded, script contains other scripts of utmost importance to the functioning of the page.
Example script with defer
parameter:
<script type="text/javascript" src="http://url_site/media/js/e921b7a36672e6f60a2f83a84d5f507e.js" defer></script>
I would like to know how to proceed so that you can remove this parameter from the script so that the pages work correctly. Even after researching a lot, I've got a lot of information, but none of them are focused on solving that problem.
$j(...) is not a function
(on account that I use the variable$j
for nonconflict), errors of functions not defined, among others.defer
parameter, it ends up being loaded afterwards and a good part ofjQuery
code is executed before executing the related scripts, thus affecting the entire page.