How to Minify Javascript in Magento

Minify-Js--Css-(Web)Minifying javascript is a very important aspect of a faster Magento store. For many stores, it is their greatest weakness on their Google page speed tests.

Why should I minify javascript?

It is important to minify your javascript because it slows down the page load of your Magento store. Many stores can save 500KB off their download size simply by minifying javascript. The less your customers need to download to view your store the faster they can start shopping and purchasing products!

How do I minify javascript in Magento?

It is simple. Follow these steps:

  1. Purchase Minify javascript / css for Magento and install it in your store
  2. In your store backend go to Extendware -> Manage Extensions -> Minify JS / CSS -> Configure -> Files and click the “Auto Configure” button

It is really that easy!


Quick Extension Overview

Speed up your site, improve your search engine site rankings and conversion rate, and improve your user experience in the process. Minify Js / CSS extension reduces page size, bandwidth, request count, and server load without anything more than installing this easy to use and feature-full extension.


 

Magento Image Optimization

Image-OptimizationMagento Image Optimization is an important performance enhancement that will speed up your Magento page load time. The easiest way to optimize all your Magento images without affecting your existing images is to use the Magento Image Optimization extension for Magento.

Why and when is image optimization important in Magento?

Image optimization affects every single page load. The reason for this is that each page includes unique images and as a result it cannot be cached by the browser well. In addition, low bandwidth and high latency connections such as those used by mobile devices will be benefited a lot from image optimization.

How do I enable image optimization in Magento?

It is simple. Follow these steps:

  1. Purchase Magento Image Optimization for Magento and install it in your store
  2. In your store backend go to Extendware -> Manage Extensions -> Image Optimization -> Configure and click the “Auto Configure” button. That’s it!

Quick Overview

Images are very important for online stores, but unnecessarily large images can slow down the user experience and reduce search engine rankings. Image Optimization will optimize your images and reduce their size without sacrificing image quality, so that your site images are faster loading.


Magento “Can’t get filling percentage” memcached issue

Some Magento store admins report that Magento is returning this exception when using memcached as a backend for either the Magento cache or the Magento Full Page Cache. This issue has its roots in the Zend Framework which returns this exception if memcache fails to return its extended stats.

To resolve this is fairly simple. All you need to do is edit the file [Magento root]/lib/Zend/Cache/Backend/Memcached.php and replace the getFillingPercentage() method with the below:

What exactly does this do?

It will make an additional attempt to get the filling percentage and if it cannot determine the filling percentage then 100 is returned which indicates it is full. In this way there will not be an exception thrown during the temporary periods when filling percentage cannot be determined.


Quick Extension Overview

Full-Page-CacheFull Page Cache reduces your Magento store’s First Byte Time, Increases your web server request rate, reduces database load, and makes your store much more responsive. Extendware’s Caching solution is the best Magento Caching Performance Extension you can buy to speed up your store and easily pays for itself by saving you money rather than buying expensive hardware solutions to increase your Magento store optimization rates.


Magento Full Page Cache Improvements

Extendware’s Magento Full Page Cache for Magento has made many, many improvements recently. We have made small changes such as increased form key support and secure cookie support and large changes such as multi-level cache backends and faster secondary cache. Here is a run down of the two most important changes:

Multi-Level Cache Backends – Do you want to use a fast memory based cache such as memcached / apc / xcache but you do not have enough memory to store the whole site in memory? Or, perhaps you need tagging support? Multi-level cache backends will come to your rescue. It allows hybrid caches such as a Memcached / File hybrid that gives you the benefit of a memory based backend with the large storage capabilities of the File backend. In addition, it will give Tagging support for memcached / apc / xcache.

Faster Secondary Cache – The secondary cache is the cache-level that displays dynamic content such as cart contents when using the full page cache. The latest page cache includes important changes to the secondary cache that allows it to be 2-3 times faster than it was before and further reduces database queries.


Quick Overview

Extendware’s Full Page Cache reduces your Magento store’s First Byte Time, Increases your web server request rate, reduces database load, and makes your store much more responsive. Extendware’s Caching solution is the best Magento Caching Performance Extension you can buy to speed up your store and easily pays for itself by saving you money rather than buying expensive hardware solutions to increase your Magento store optimization rates.


Magento Improved Indexing – Faster Magento Admin Backend

Extendware’s Magento Improved Indexing helps make the backend more responsive. Many stores will discover that in time the saving of products, categories, and other items becomes slow. The more products / stores that you have the slower it can become. This is a big issue because time is money. Employees will do less work in the same amount of time if the admin backend is slower.

Improved Indexing will perform index operations in the backend. Index operations is a large part of why product saving is slow. The end result is a more responsive backend that allows you and your employees to get more work done.

What are the expected results? This depends on a large variety of factors. Most stores will see around 2-18 seconds time-savings per saved product. The more products you have, the more overloaded your mysql database, the more stores you have, etc, will mean more savings.


Quick Extension Overview

Increase the speed of your administrative backend. Do you have a slow admin backend when saving products, categories, etc? Improved Indexing will speed up your admin backend by making the saving of products, categories, etc more responsive. The end result is that you can get more work done in less time.


Slow Magento Checkout / Product Editing? It’s the cache!

How many times have you you experienced a slow down from your Magento store when :

  • Checking out (specifically the last step)
  • Saving products in the administrative area

If so, you are likely suffering from a bloated, inefficient cache. You need Performant Cache Backends for Magento to resolve this issue.

Why do these areas of store operation slow down?

These areas attempt to flush the cache by tags. The problem with the cache implementation in Magento is that a flush by tags will cause a full scan on the cache directory in order to find cache items matching the tag. For smaller stores that only need to scan a few hundred files this is no problem. Larger stores, with thousands of cache objects, will experience major slow downs. Sometimes as a high as 30-60 seconds. With our Performant Cache Backends flushing by tags will take a fraction of the time.

Is there any way to confirm that my store is being slowed due to this issue?

Yes. If these actions are faster when the cache is disabled or close to empty, then this indicates that part of the slow down is the result of this issue. Once the cache is full, then more files will need to be scanned, and checkout / product editing will become slower.


Quick Extension Overview

If checkout or product saving is slow, you need Redis support, or flushing by tags is slow, then you need our Performance Cache Backends extensions. You will receive an improved file based cache and a redis based cache that is optimized for tag flushing.


 

Performance of Merging Javascript / CSS in Magento

Minify-Js--Css-(Web)Summary: Built-in merging of Javascript / CSS will slow down your store. You need Magento Minify Javascript / Css to properly merge files

Many store owners are enabling Javascript / CSS merging in Magento in order to “increase performance”. You can go to System -> Developer and look under Javascript and CSS Settings to see if your store is currently merging Javascript / CSS. If you have enabled merging, then we recommend that you disable this setting now. If you need proper merging, then you should purchase Minify JS / CSS.

Why is built-in merging of Javascript / CSS bad?

It breaks the browser cache. Merging is not done in an intelligent way. It is done too aggressively as all files are merged into one css and one javascript file. This is effective one a single page, but is not effective for a site as complex as Magento. As your customers change page types (home page -> catalog page -> product page) then it will generate new merged URLs which breaks the browser cache and causes the redownloading of all your CSS / JS files.

Why does the default merging generate different URLs for different page types?

Different page types have different CSS / Javascript requirements. Your home page may include 10 javascript files while your catalog page might include 12 javascript files. As a consequence, the merge URL for the 10 file merge will be different than for the 12 file merge.

Does this mean it is better to disable merging?

Yes, your site will be faster if you disable merging. Alternatively, you can use Minify JS / CSS for Magento, which merges intelligently. Your Google Page Speed will decrease if you disable merging and do not use Site Optimizer. However, Google Page Speed only measures page speed. It does not measure site speed. An individually loaded page will be faster with merging enabled, but your entire site will be slower. So, if your customers visit more than one page, you want to disable merging.

Is there a way to verify merging is done properly or not?

Yes, go to the home page of your site and record all javascript / css urls. Then, do the same for a catalog page and a product page. Next, verify that the urls are all the same if the same content is shown. With default merging enabled, you will notice different urls and when you go to the urls you will notice that 90% of the javascript / css is duplicated among the different urls.


Quick Extension Overview

Speed up your site, improve your search engine site rankings and conversion rate, and improve your user experience in the process. Minify Js / CSS extension reduces page size, bandwidth, request count, and server load without anything more than installing this easy to use and feature-full extension.


 

Magento Full Page Cache Auto-flushing / Tagging

Extendware’s Magento Full Page Cache has an exciting new addon feature – Auto-flushing / tagging. The problem with many full page cache systems is that you must flush the entire cache after changing a product / category. This reduces the usefulness of the cache for quickly changing stores. Our Magento cache warmer / crawler extension alleviates this problem by periodically crawling your store to ensure pages are re-cached.

However, crawling is not a complete solution because it is not sufficiently real-time. Auto-flushing / tagging is the complete solution as it will delete affected pages after a product / category changes. With our tagging addon you can select the tagging level and auto-flushing events that will trigger the flushing of specific pages. This provides maximum flexibility and ensures content freshness for your store. Refer to the Extendware Magento Full Page Cache (FPC) product page for more information.

Magento Image Optimization Extension

Extendware’s Magento Image Optimization is very important when trying to improve your Google page speed. This is especially true because Magento will auto-resize your catalog product images and when it does this they are not in their most optimal form. Previously, having an magento image optimized store was impossible.

That has all changed! Now Magento Image Optimization will optimize your jpeg, gif, and png files so that they are as efficient and fast to download as possible. Some stores are seeing up to a 30% reduction in total page weight and nearly every store will see some reduction. Images are optimized efficiently in the background so that your site speed is not affected. If you are running an older version of Site Optimizer, then we highly recommend upgrading. Refer to the demo at the Magento Image Optimization product page.

Magento Javascript / CSS Merging

Extendware’s Magento Minify JS / CSS 1.2.8 was released today and it includes some very important compatibility features. In previous versions of Magento Minify JS / CSS the order of javascript / CSS was not guaranteed to be the same as before the extension is installed. Now, the order that these files are loaded is guaranteed to be the same as before when selecting the “Never”, “Automatic” and “Always” merging modes. “Automatic (aggressive)”, the previous behavior, can still be used and it will merge more files. The order of loaded files only affects some Magento stores, so try the different merge modes and see which one is best for your store.

In addition, this release solved an issue where the merging of pre-minified files and normal files were causing issues with some browsers. Now pre-minified files are not combined with normal files and this solves the browser issues.