Book Image

Instant Magento Performance Optimization How-to

By : Nayrolles Mathieu (USD), Mathieu Nayrolles
Book Image

Instant Magento Performance Optimization How-to

By: Nayrolles Mathieu (USD), Mathieu Nayrolles

Overview of this book

The optimization of an attractive commercial website is a non-trivial task that demands time and knowledge. Optimization is a critical point for all growing businesses because a misconfiguration could make you lose money, a lot of money. If your server is overloaded, a browser that wants to turn into a buyer will not be able to, and you will lose customers. "Instant Magento Performance Optimization How-To" is a practical, hands-on guide that provides you with a number of clear, step-by-step exercises to help you reach a high performance level for your Magento stores and keep your customers satisfied.This book looks at tweaks and tips used to boost your Magento Performance, and breaks down the confusion that surrounds the subject.You will learn how to compress your pages, styles, and scripts by almost 80%. We will also take a look at controversial optimization settings such as Magento core compilation or enabling all caching systems. You will discover new applications that improve performance. If you wish your e-businesses to grow and want to keep your customers satisfied, you definitely need this book.
Table of Contents (7 chapters)

Enhancing the expiration date (Should know)


In this recipe, we will use the Apache module Expires in order to maximize the cache utilization.

How to do it...

Open the file named .htaccess in the home directory of Magento and go to line 181. Modify lines 181 through 189 so that it looks like the following:

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires
    ExpiresActive On
    ExpiresDefault "access plus 1 month"
</IfModule>

How it works...

The Apache Expires module controls the HTTP header named Expires. These headers are used to inform the client about the document's validity and persistence. If the requested document is present in one of our cache systems, it will be provided from the cache rather than the filesystem. After a fixed amount of time, one month in this case, the copy is considered expired and a new copy has to be copied into the cache from the original source.