GTmetrix advises I inline these

<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>lib/ccard.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>

I inlined them to the footer removed the calls in the page.xml and awesome got a A on pagespeed

However I have a webpos extension and it doesn't use the template header or footer so checkout doesn't work unless I replace the call outs in page.xml

So my question is how do i inline these do i do it in the extensions phtml?

1 Answer 1


It is always good to keep them where they belongs that's page.xml but if placing it somewhere else is making your performance better then alright. You've to define them in xml file of that extension probably in default section of ut.Have you checked this after merging too ? because these JS order can mess things around when you merge them all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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