2

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?

<cms_index_index>
 <reference name="head">
 <action method="removeItem"><script>media/js/cookieinfo.min.js</script></action>
 </reference>
</cms_index_index>
PЯINCƎ
11.8k3 gold badges27 silver badges85 bronze badges
asked Sep 3, 2018 at 7:41

3 Answers 3

2

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

answered Sep 3, 2018 at 8:10
1
  1. If your js file is in : root/js/, use this:

    <action method="removeItem"><type>js</type><name>file.js</name></action>
    
  2. If your js file is in : skin/frontend/{package}/{theme}/js/, use this :

    <action method="removeItem"><type>skin_js</type><name>file.js</name></action>
    
  3. Clean cache, then it should work

answered Sep 3, 2018 at 8:05
0

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.

answered Sep 3, 2018 at 10:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.