Magento Forum

   
Where / What is weee.js - can I remove it? 
 
BrianD65
Jr. Member
 
Total Posts:  18
Joined:  2008-05-22
Glasgow
 

Hi all,

I’m just at the finishing stages of a new store.

I’m currently working on improving page performance - slimming down css, javascript etc....

The one file that keeps coming up, is js/varien/weee.js

Can anyone tell me what this is for, and where it is getting called from?!

I have searched and searched - best I can figure is that it’s to do with tax? Is that right?

I don’t mind keeping it - I would just merge the file with my javascript merged file.
(I didn’t use the built in javascript merge! Too many modifications!!)

Thanks in advance for any insight into this.
BrianD

 
Magento Community Magento Community
Magento Community
Magento Community
 
SpinOneSolutions
Member
 
Avatar
Total Posts:  57
Joined:  2010-01-20
Santa Monica, CA
 

Doing a global search brings up 4 lines in /app/design/frontend/base/default/layout/weee.xml (note that path might changed based on your theme architecture).

To remove it you’d probably want to create a custom layout XML file and add.

<reference name="head">
            <
action method="removeItem"><type>js</type><name>varien/weee.js</name></action>
        </
reference>

or I suppose you could override weee.xml and just remove those lines.

I’d be particularly careful since this js deals with checkout.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BrianD65
Jr. Member
 
Total Posts:  18
Joined:  2008-05-22
Glasgow
 

I took the option of commenting out the lines in the xml file, and as weee.js is only one function, it was easy enough to include in my merged javascript file - got my pagespeed up to 97/100 (well chuffed!!!)

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top