cancel
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

7 REPLIES 7

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.

 

SmileadeR

--------------------------------------------------------------------------------
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>
    </reference>

 

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.

 

Regards,

 

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

Re: How to remove js files

still u didnt give clear solution for remove js.

 

http://m.nms.com/pub/static/version1527779756/frontend/Gandalf/nmsnuevomobi/en_US/Magento_Ui/js/lib/...

 

how can i remove this js in home page

Re: How to remove js files

How do you remove a js file based on the source name? For example, somehow script that is not pointing to a file was added on certain pages, but I can not find in the code where and how it was added. The source is '//skin/frontend/default/'. This is for Magento 1.