Advanced extensions for Magento® to help your business - Welcome to Moogento!

Quick Magento Speed Win - Remove Print.css

Quick Magento Speed Win - Remove Print.css

Quick win of the day - removing an item from your pages that is likely never used.

View the source of your page and check if you have print.css loading in there. Likely you do, and likely nobody uses it!

Even if you're using something to combine css files into one, it'll be leaving this one separate.

Each item loaded takes up a slot of the number of files the browser can download in parallel (I think this is 6 in Firefox). And there's the time to connect and download it, however small that is.

If you found print.css in your page, have a look here for local.xml:

/app/design/frontend/default/{name of your theme}/layout

If it doesn't exist, make it.

Add these lines (if the file exists already then add the line in the same position):

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="head">
            <action method="removeItem"><type>skin_css</type><name>css/print.css</name></action>
        </reference>
    </default>
</layout>

Clear the cache, done.

Special Offers & News
Like what you just read? Let's stay connected - join our (free) group :

• Early access to limited specials
• Occasional news / new features / essential security updates

We don't spam.

2 comments on “Quick Magento Speed Win - Remove Print.css”

  • Peter

    Hi Jim

    Are there any downsides to removing print.css?

    I see that some top websites still use it.

    Best Regards
    Peter

    Reply
    • Jim

      Sure, physically printing any page won't look as good. But if you're selling things that people don't need to print, I'd say no worries removing it.
      It'd be interesting to hear use-cases for leaving it.

      Reply
Leave a Reply
Get our superpowered newsletter!
Exclusive specials, critical security updates, and occasional news
We don't spam.