Question

I am trying to get rid of a css file, which constantly is being loaded but I don't use dates anywhere in the frontend. It seems I can't erase this file no matter what but it blocks my rendering on each site...

Yes, I could just delete the code of the css file but my browser would still make one extra request to load the blank file.

/js/calendar/calendar-win2k-1.css

I tried editing the local.xml of my own theme to remove this file:

<layout>
  <default>
    <reference name="head">
       <action method="removeItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name></action>
     </reference>
  </default>
</layout>

But that does not change a thing. Then I saw the same problem with a possible solution and tried to copy it:

I tried Rajeev's approach to create a module and remove the file in an own custom layout update, however even though my module and custom layout update work (I have succesfully tried adding other example files in the head with my module), the file won't disappear.

Was it helpful?

Solution

Please, try :

<layout>
    <catalog_product_view>
        <reference name="head">
            <action method="removeItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name></action>
        </reference>
    </catalog_product_view>
    <catalogsearch_advanced_index>
        <reference name="head">
            <action method="removeItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name></action>
        </reference>
    </catalogsearch_advanced_index>
</layout>

For some reason, it doesn't work with the default handle.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top