Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em><strong>To answer Part 1</em></strong> - no not all of these are required, but most are and it depends on your theme. A default magento theme uses them all, but a custom one almost certainly won't need all the scriptaculous ones. </p> <p>The varien, mage and prototype ones will almost always be required, creating a theme that does away with all of these is very, very, hard because some of the in page javascript that depends on them actually comes not from the theme but from the core php files.</p> <p>On simple themes I've had good results removing dragdrop and slider as I don't use the product zoom display. You can remove menu if you're not using the Magento menu, but only if you're prepared to make dummy js functions to catch any calls to it left behind - the menu navigation object injects javascript function directly from the php layer that need to be caught (or better yet you can roll your own category navigation object that doesn't do this!).</p> <p><em><strong>For Part 2</em></strong> - edit your themes page.xml layout to remove them from the <code>&lt;block type="page/html_head" name="head" as="head"&gt;</code> tag. I suggest commenting them out and testing each one as you go.</p> <p>You can inject required javascript files into the page types that do need them by adding javascript tags to the head section of the appropriate layout files. As an example of how this is done have a look at the default sendfriend.xml layout file which adds the product.js file to the head only for pages that need it.</p> <p>If you start adding/removing javascript aggressively based on page type you also need to consider how Magento merges javascript files. There's a setting in the developer area of the configuration screens to merge javascript files, turning this on is a very good thing. This merges all javascript files inside the head area that have been injected using the "addJs" or "addItem" with an item type of "js" or "skin_js".</p> <p>BUT because of this if you start including/excluding scripts on a page by page basis you'll find that you're generating different merged js files on different pages - destroying most of the benefits of caching a single large js file!</p> <p>To get the best of both worlds you should be able to inject js into the head using but without specifying the item type, thus preventing that file from being merged - but I've not tried this yet. If this works you'll find the core libraries merged and your per page custom files included individually, meaning you cache the big one and they only download the bit that changes. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload