Remove deleted javascript from body

Remove deleted javascript from body



I deleted the file in my ftp but it is still being loaded on every page at the end of the body tag


<script type="text/javascript" id="cookieinfo"
src="/media/js/cookieinfo.min.js">
</script>



Would the method to removing it be placing this text in the page.xml file?


page.xml


<cms_index_index>
<reference name="head">
<action method="removeItem"><script>media/js/cookieinfo.min.js</script></action>
</reference>
</cms_index_index>




3 Answers
3



if you want delete that js file from entire page in your website, try to place this code in your local.xml, if the local.xml file still does not exist you can create it in the this folder :


<project_root>/app/design/frontend/<your_theme>/layout/local.xml



and then write this code in your local.xml


<?xml version="1.0"?>
<layout>
<default>
<reference name="head">
<action method="removeItem">
<type>js</type>
<name>media/js/cookieinfo.min.js</name>
</action>
</reference>
</default>
</layout>



you can reference to this link for detail answer :



Js file is not removed from xml



If your js file is in : root/js/, use this:


root/js/


<action method="removeItem"><type>js</type><name>file.js</name></action>



If your js file is in : skin/frontend/package/theme/js/, use this :


skin/frontend/package/theme/js/


<action method="removeItem"><type>skin_js</type><name>file.js</name></action>



Clean cache, then it should work



Perhaps I phrased the question incorrectly. Still new at Magento. My solution was that I had forgotten the script was still in the System>Configuration>Design>Footer in the Miscellaneous HTML block. That's what was generating a 404.



Thanks for contributing an answer to Magento Stack Exchange!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.