Showing results for 
Search instead for 
Did you mean: 

How to remove js files

How to remove js files

How do i remove these files? 

I hope some of you will know the answer Smiley Happy 

Thank you in advance


Best regards Patrick


Skærmbillede 2016-09-14 kl. 16.53.53.png


Re: How to remove js files

You can go to XML file of it (the frontend layout location) and comment out line code like this :


<action method="addItem"><type>skin_js</type><name>xxx/yyy.js</name></action>

So you can remove these js files you want.



Magento Tips & Tricks

Re: How to remove js files

You can test in js folder

<reference name="head">
    <!-- For a JS in the js folder -->
    <action method="removeItem"><type>js</type><name>functions.js</name></action>
    <!-- For a JS in the skin folder -->
    <action method="removeItem"><type>skin_js</type><name>functions.js</name></action>


Re: How to remove js files

I'm not sure i fully understand. So if i want to remove a file i write the following

       <action method="addItem"><type>skin_js</type><name>and here: the path of the file?</name></action>


in local.xml within the <layout> tags?

Re: How to remove js files

To remove js file you have to search that js file into the layout of that particular page. In layout file you will find something like this skin_js path_of_js_file/YourJsFile.js just comment it and try to refresh your page. If the js is not removed then it might be loading into the template file of that page.Comment it and check again.




Knowband Plugins

Re: How to remove js files

Actually you're asking the wrong question. The right question is "Why do I have duplicates?".  Usually the reason is that you have several extensions that try to load their own copy of jQuery or some of its plugins. For example I've seen a Magento installation that tried to load SEVEN (!) jQueries before I cleaned it up. 


First thing you should do is to check what extensions are the culprits. Sometimes they have an option not to load their own copies of scripts. However sometimes you need to find their layout files and comment out or remove appropriate lines (you probably want to copy those under your theme first). Using layout updates may remove ALL scripts of same name, which is usually not the desired effect either.

Tanel Raja