Contents of the document

Similar documents
E-commerce is also about

ultimo theme Update Guide Copyright Infortis All rights reserved

Shop by Manufacturer Custom Module for Magento

Content Management System

ultimo theme Update Guide Copyright Infortis All rights reserved

Drupal CMS for marketing sites

Criteo Tags & Feed Extension for Magento

Installation, Configuration, and Usage

AUDIT REPORT EXAMPLE

Front-End Performance Testing and Optimization

FORTIS. User Guide. Fully responsive flexible Magento theme by Infortis. Copyright Infortis. All rights reserved

Product Name: Size Chart Popup Version: Document Type: Help doc Author: Milople Inc.

SAHARA DIGITAL8 RESPONSIVE MAGENTO THEME

DPD shipping module documentation. Magento module version 2.0.3

Official Amazon Checkout Extension for Magento Commerce. Documentation

Module Private Sales User Manual

JTouch Mobile Extension for Joomla! User Guide

ProxiBlue Gift Promotions

Site Store Pro. INSTALLATION GUIDE WPCartPro Wordpress Plugin Version

ekomimeetsmage Manual for version 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0

WompMobile Technical FAQ

The Web Pro Miami, Inc. 615 Santander Ave, Unit C Coral Gables, FL T: info@thewebpro.com

skype ID: store.belvg US phone number:

9 Tried and Tested Tips to Increase the Power of your Magento Store

Installing an open source version of MateCat

Top Navigation menu - Tabs. User Guide 1. &

MAGENTO Migration Tools

This installation guide will help you install your chosen IceTheme Template with the Cloner Installer package.

Tonido Cloud Admin Guide

Fortis Theme. User Guide. v Magento theme by Infortis. Copyright 2012 Infortis

Magento module Documentation

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

Web Performance. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 2014/15. Sérgio Nunes

ProxiBlue Dynamic Category Products

MyanPay API Integration with Magento CMS

So you want to create an a Friend action

MAGENTO THEME SHOE STORE

Getting started with PrestaShop 1.4

Product Name: ANZ egate Connect Version: Document Type: Help doc Author: Milople Inc.

Optimizing your Magento store for heavy API access. 1.0 June 2013

Microsoft Expression Web

SAHARA FASHION15 RESPONSIVE MAGENTO THEME

Creating Value through Innovation MAGENTO 1.X TO MAGENTO 2.0 MIGRATION

X-POS GUIDE. v3.4 INSTALLATION SmartOSC and X-POS

install the extension:

Altima Lookbook Free Extension v

ConvincingMail.com Marketing Solution Manual. Contents

Important Notice. All company and brand products and service names are trademarks or registered trademarks of their respective holders.

OxyClassifieds Installation Handbook

Speed up your web site. Alan Seiden Consulting alanseiden.com

Installation Manual for Catalog Infinite Scroll extension

E-Commerce Installation and Configuration Guide

[Jet-Magento Integration]

Gladinet Cloud Backup V3.0 User Guide

nopcommerce User Guide

Fortis Theme Update Guide

Basic Web Fullerton College

PASTPERFECT-ONLINE DESIGN GUIDE

shweclassifieds v 3.3 Php Classifieds Script (Joomla Extension) User Manual (Revision 2.0)

Creating Online Surveys with Qualtrics Survey Tool

CloudOYE CDN USER MANUAL

All the materials and/or graphics included in the IceThemetheme folders MUST be used ONLY with It TheCityTheme from IceTheme.com.

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

Magento Extension Point of Sales User Manual Version 1.0

Product Personalization. User manual

ecommerce LMS Administrator s Manual

LICENTIA. Nuntius. Magento Marketing Extension REVISION: SEPTEMBER 21, 2015 (V1.8.1)

SugarCRM CE (Community Edition Only) Plugin. Installation. Guide

MAGENTO TRAINING PROGRAM

Managing your Joomla! 3 Content Management System (CMS) Website Websites For Small Business

edream Fixed Header edream Market

Magento & Zend Benchmarks Version 1.2, 1.3 (with & without Flat Catalogs)

Prestashop Ship2MyId Module. Configuration Process

Google Trusted Stores Setup in Magento

Bubble Full Page Cache for Magento

CheckItOut Developer Manual

Plesk 11 Manual. Fasthosts Customer Support

ULTIMATE LOYALTY MODULE

The ultimate integrated Magento helpdesk solution

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Advanced Event Viewer Manual

Setting Up Your FTP Server

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

Bubble Code Review for Magento

Digital Downloads Pro

1: 2: : 3.1: 3.2: 4: 5: & CAPTCHA

Shopping Cart Manual. Written by Shawn Xavier Mendoza

IMPORT / EXPORT PRODUCTS

When you first login to your reseller account you will see the following on your screen:

CARSTORE RESPONSIVE MAGENTO THEME

How To Sync Between Quickbooks And Act

nopcommerce User Guide

skype ID: store.belvg US phone number:

The importance of Drupal Cache. Luis F. Ribeiro Ci&T Inc. 2013

CMS Training. Prepared for the Nature Conservancy. March 2012

JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA

Transcription:

Contents of the document Foreword... 4 The product... 4 Purpose of the document... 4 Prerequisites... 4 Archive content... 4 Product installation procedure... 5 Requirements... 5 File System permissions... 5 IonCube... 5 Image Magick... 6 Getting the product and installing it... 6 Licence configuration... 7 Licence expiration... 7 Product basic configuration procedure... 8 Product full documentation... 9 Blockhtml Cache... 9 What is this?... 9 Access... 9 Grid Config Interface... 10 Component details... 10 Cache Entry Config Interface:... 11 Component details... 11 Additional configuration of the blockhtml cache:... 12 Configuration details... 12 Learning Grid Interface... 12 Component details... 13 Fullpage Cache... 13

What is this?... 13 Access... 13 Grid Config Interface... 14 Component details... 15 Cache Entry Config Interface... 15 Component details... 15 Htaccess... 16 What is this?... 16 Access... 16 Config Interface... 16 Component details... 17 Minify... 18 What is this?... 18 Access:... 18 Config Interface:... 19 Component details... 19 Minify js configuration... 19 Component details... 20 Minify css configuration... 20 Component details... 20 Sprite... 21 What is this?... 21 Access... 21 Config Interface... 22 Component details... 22 Create your sprite... 22 CDN... 24 What is this?... 24 Access:... 24 Config Interface... 24 Component details... 24 Configuration of CDN... 25 Component details... 25 Configuration of FTP CDN... 25

Component details... 26 End of the procedure... 26 Advanced CDN configuration... 27 Advanced configuration of the module... 30 Custom block caching & hooks... 30 Tip for blocks... 30 General information on the Magento Cache... 30 BlockhtmlHelper Cache... 30 FullpageHelper Cache... 31 Example of a concrete case of adaptation... 32 Checking your settings & scores with Gtmetrix, Yslow, and/or Pagespeed... 33 Results... 33 Contacts / Support... 33 Credits & copyrights... 34

Foreword The product Nitrogento boost Magento page load time through many optimization systems. All of them are configurable from the back office, except the Custom Block Cache feature that require some few additional code in your website sources. Purpose of the document This document explains you how to install the Nitrogento module, how to configure it, and how to go even further if you want to create compatible extensions using this module. Prerequisites Magento with an unmodified core Nitrogento operates on all CE 1.3, 1.4 and 1.5 versions and on EE 1.8 and 1.9 (but FPC should be desactivated) The Nitrogento extension requires installation of the server library Ion Cube available at the following address: http://www.ioncube.com/loaders.php To take advantage of optimization via "sprite", you must also install the Image Magick library on your server available at the following address: http://www.php.fr/doku.php/php.fr/ref.imagick.html We don t recommend installing Nitrogento along with another cache management module unless you know what you're doing since the effect can be contradictory, the site can bug and you ll perhaps loose performances instead of increasing them. Archive content This extension contains files located in the following folders : app/code/local/nbssystem/nitrogento (module sources) app/design/adminhtml/default/default/template/nitrogento (module admin templates) app/etc/modules/nbssystem_nitrogento.xml (Magento module configuration file) app/design/frontend/default/default/layout/nitrogento.xml (module frontend template) lib/minify/* (HTML/CSS/JS minify library) lib/sprite/* (sprite library) js/nitrogento/sprite.js (manages the sprite panel) lib/zend/ftp.php, lib/zend/ftp/* (FTP library for the CDN) media/css,media/js,media/sprite

Product installation procedure Requirements The product will check if all pre requisite are met. Mainly, you need Ioncube extension installed on your server and optionnaly Image Magick (if you intend to use the Sprite feature). If you have some errors, Nitrogento should report them like this : File System permissions The following folders and/or files must be readable & writable on the file system : media/css (merge and minify of CSS) media/js (merge and minify of JS) media/sprite/images/ (sprite images) media/sprite/css/sprite.css (the css that manage sprite).htaccess (the one at the root of the site) Index.php IonCube You can also check the official install process here. The loader can be found here. Basically, you have to pick the right loader for your environment, then place the line /usr/local/ioncube/ioncube_loader_lin_5.2.so in your /etc/php5/php.ini. Precise path can vary depending on your linux release / version and ioncube_loader_lin_5.2.so should be replace with the matching version for you PHP. (php --version to get it) Another IonCube install howto can be found here.

Image Magick If you have a Debian based Linux distribution on your server, issuing a simple apt-get install php5- imagick as root should do the necessary steps. Once both extension are installed, restart your apache server. (under linux, this could be : /etc/init.d/apache2 restart) Getting the product and installing it READ CAREFULLY AND FOLLOW STEP BY STEP WITHOUT SKIPPING ANY LINE. This install process should take you less than 30 mins. Buy the product online on our website : www.nitrogento.com Fill the URL (production and if any, preproduction) so we can compile your licence key Get the extension archive, upload it to your website root, unpack its content. If needed, fix the rights / permission & ownership with chmod and chown Check that your admin theme is default (only one directory in app/design/adminhtml/default) or custom (another one is there, let s call it mytheme ). If your theme is customized, follow this procedure : Move in the app/design/adminhtml/default/default directory and move the content of the folders layout and template in the directory theme of your custom template (the mytheme ). Connect to your admin panel. Go to System->cache management and select all cache and then select desactivate action, validate. (this is temporary) If you get some messages (error in permissions, Ioncube or ImageMagick not installed), correct them by installing the needed lib/binaries (Ioncube & Imagemagick apt-get install php5- imagick ) or fix the permission / ownership of the uploaded files (chown / chmod). For IonCube, get the good version here (http://www.ioncube.com/loaders.php) and then follow instructions here (http://www.ioncube.com/loader_installation.php). You will be requested for your licence key. (see procedure below)

Licence configuration Deconnect / reconnect You shouldnow be able to go to System / Configuration / Advanced / Nitrogento Licence. Paste in your licence string and clic Save config. No error should pop. If an error occur, please take contact with support and before, double check that you recorded the good domain name for your main Magento install. Licence expiration If your licence is expired, no problem, the product will desactivate itself properly without breaking your site and you will get a message some days before and then after you will get this message :

Product basic configuration procedure 1. Login to your admin, move to System, desactivate your cache if this has not already been done. 2. Move to System->Nitrogento. Check if you want to desactivate any block or FPC cache. 3. Next, parameter the htaccess settings, activate the three check box, default settings are 1 year, this make sense but you can have, for specific reasons, to change this. (Don t worry, if the file size is changed, it will be reloaded by the browser anyway) 4. Sprite, clic the orange button on the bottom left side Create Sprite. Ch oose your pictures and then clic Make Sprite, then clic the make CSS button. 5. Move to Minify settings activate all of them. (Minifying HTML is your call since compressing it take a it of time but lower the transferred size). 6. If you want to also minify JS (desactivated by default since this could sometimes break things), go to system->configuration->nitrogento->minify go JS & CSS, and parameter accordingly to your needs. Then get back to System->Nitrogento->Minify clic the orange button refresh CSS & JS. 7. Move to System-> configuration->advanced->nitrogento->cdn settings. (Fill the 3 fields, don t put http before), add your CDN URL (cdn.foobar.com if you want only one cdn or cdn[x].foobar.com if you want many of them). 8. Choose EITHER self cdn OR ftp cdn and fill the fields accordingly. Get back to System- >Nitrogento->CDN, clic the upload button and look at your files uploading, your theme will be patched automatically. Activate CDN by checking the box and selecting the activate action. 9. Finally, move to System->cache management, activate Nitrogento Full Page Cache (you can get back to system->nitrogento->cache->full page cache to set some exception if needed) and get back in system->cache management and activate Nitrogento Full Page Cache. 10. The only remaining thing to do is insert your custom bloc. N o straight to the goal method here, you have to move to the documentation and modify a bit your code. Nothing real hard to do but no Auto Magic method there. (Move to custom bloc caching & hooks in the documentation)

Product full documentation Blockhtml Cache What is this? To render each of its pages, Magento divides it into "blocks", the sum of these blocks will form the rendering of the page. It is possible to cache the html rendering of these blocks to avoid having to recalculate content on the server side. E.g. If we cache the html rendering of the block containing a product, we won't have to query the database to search for product info anymore. Access From your Magento BackOffice, go to System> Nitrogento>Cache>Blockhtml

Grid Config Interface Component details Component Change View button Add Config button Flush Blockhtml Cache Objects button Enable/disable/refresh action Cache entry line (e.g. Catalog View) Description Used to change the user view (the top one is in advanced mode, there is however one in simplified mode) Used to add a blockhtml cache entry configuration Used to clean fullpage cache Used to respectively enable, disable, or refresh a cache entry. Note: disable cleans the cache beforehand. This line is a cache entry; more information is available in the Cache Entry Interface section. Click a line to edit this configuration.

Cache Entry Config Interface: By clicking a line, you will access this configuration: Component details Components Description Required Block Class Class of the block to be cached Y Block Template Template associated with the block to be cached Y Friendly Entry This label is used as an indication for a non-technical N user on the current block. Helper Class This is the class used to create the adapted elements Y for the cache. For technical users, refer to the section "Cache Blockhtmlhelper" If you don't know what to put here, put: nitrogento/cache_blockhtml_generic_static_impl or nitrogento/cache_blockhtml_generic_dynamic_impl (the difference is explained in the section // TODO) Cache Lifetime Cache lifetime expressed in seconds Y Store Stores on which the cache entry is active (all, for all N stores) Package Package on which you want to cache this entry (all, N for all packages) Theme Theme on which you want to cache this entry (all, for N all themes) Customer Group Customer Group on which you want to cache this N entry (all, for all customer groups) Activated Flag indicating whether the cache entry is active or not N

Additional configuration of the blockhtml cache: From your Magento BackOffice, go to System>Configuration, then: You should arrive at: Configuration details Configuration Config View Activate learning mode Action Used to choose the simple or advanced view for blockhtml cache config Used to activate the learning mode for blockhtml cache config Learning Grid Interface Note: this interface is available if you have activated "learning mode" configuration and if you are in "advanced" view. Once you have activated this configuration, you will have the time to display the rendering of each block. (Be careful, some blocks can contain other blocks). From here, you can decide to add more to the cache. It s a good idea to have good technical knowledge of Magento or to get advice from someone that does before adding entries to the cache.

Component details Component Put in Static Cache Config/ Put in Dynamic Cache Config action Cache entry line (e.g. Catalog View) Description Used to respectively add a static/dynamic cache entry (details below) This line is a cache entry; more information is available in the Cache Entry Interface section. Click a line to edit this configuration. Static cache entry: is a cache entry that considers certain parameters just not the page URL (quite appropriate for constant blocks on all sites (e.g. Footer)) Dynamic cache entry: is a cache entry that considers the same parameters as the static cache entry and, not only that, the URL of the requested page with its parameters in GET. If there is any hesitation, always take the dynamic cache entry. Fullpage Cache What is this? The fullpage cache is a process aimed at caching a complete site page to avoid having to consistently redo expensive processing server side. Once the page has been cached, pages can be very rapidly served to customer browsers. This type of cache is well suited for example when pages don t change from one visit to the next (homepage, login page, product page, etc.) Unfortunately, a disadvantage of the fullpage cache is that once the customer is logged in to the site, pages can no longer be cached. Access From your Magento BackOffice, go to System> Nitrogento>Cache>Fullpage

Grid Config Interface

Component details Component Add Config button Flush Cache Fullpage Objects Enable/Disable/Refresh actions Cache entry line (e.g. Homepage) Description Used to add a fullpage cache entry configuration Used to clean the fullpage cache Used to respectively enable, disable, or refresh a cache entry. Note: disable cleans the cache beforehand. This line is a cache entry; more information is available in the Cache Entry Interface section. Click a line to edit this configuration Cache Entry Config Interface By clicking a line, you will access this configuration: Component details Components Description Required Friendly Entry This label is used as an indication for a nontechnical N user on the current page. Full Action Name This is the identifier that allows Magento to O recognize a page. (Note: for a non-technical, do not touch this field) Helper Class This is the class used to create the adapted O elements for the cache. For technical users, refer to the section "Cache FullpageHelper". If you don't know what to put here, put: nitrogento/cache_fullpage_generic_impl Cache Lifetime Cache lifetime expressed in seconds O Store Stores on which this cache entry is active (all, for N all the stores) Activated Flag indicating whether the cache entry is active or not N

Htaccess What is this? The cache of your site's customer browsers can be activated via the parameters that reside in.htaccess. In order to simplify this configuration, Nitrogento directly integrates a menu in Magento. These optimizations reduce download times for certain elements (by compressing them) and keep them in the cache when the browser passes over a known element (expire / etags). Access From your Magento BackOffice, go to System> Nitrogento>Htaccess Config Interface

Component details Component Save Config button Activate htaccess deflate Activate htaccess expire Activatehtaccess etags nbs-system-blog Description Used to save the deflate config in the.htaccess file of the Magento store root folder (make sure it is accessible in read and write). Activates the compression of text elements Instructs the customer browser to cache received elements, time can be defined by resources. Default values are usually practicable by most sites. The Entity tag is used by the knowledge server when the resource has been modified. Additional information is available from: http://www.nbssystem.com/blog/technique/faq/optimisations-grace-au-fichierhtaccess/

Minify What is this? Minify is an optimization that reduces text elements sent back to the browser. This includes deleting comments, deleting line breaks and unnecessary spaces. This also includes merging files (js and css) You can manage this optimization on Magento html, css, and js. Access: From your Magento BackOffice, go to System> Nitrogento>Minify

Config Interface: Component details Component Refresh CSS and JS button Enable/disable action Minify line Description Used to refresh minify and merge CSS and JS Used to respectively enable, disable, or refresh minify optimizations. This line is a configuration line for minify. Three configurations are available: html, css, js. Click a line to edit this configuration (except minify html) Minify js configuration You can access this configuration by clicking the minify js line. When this configuration is activated, JavaScript files included in the pages will be merged into one file, which will reduce the number of connections to the server. The following options are available: Important: JS files must be declared in the layout(normal and specific procedure)

Component details Component Minify js Line break removal Put JS at bottom Ignore JS files Description Indicates whether the generated JS file will be reduced. Deletes carriage returns. This option should be left at No. If Yes, inclusion of JavaScript is done at the bottom of the HTML page Does not reduce selected JavaScripts Minify css configuration You can access this configuration by clicking the minify css line. When this configuration is activated, css styles included in the pages will be merged into one file, which will reduce the number of connections to the server. The following options are available: Important: CSS files must be declared in the layout(normal and specific procedure) Component details Component Minify css Line break removal Description Indicates whether the generated CSS file will be reduced. Deletes carriage returns

Sprite What is this? Sprite is used to merge your skin images into one big image. The css must be rewritten to accept this big image. Access From your Magento BackOffice, go to System> Nitrogento>Sprite

Config Interface Component details Component Create Sprite button Enable/disable actions Description Used to create your Sprite, refer to procedure below Used to respectively enable, disable, or refresh sprite optimization. Create your sprite Click the "Create Sprite" button shown above. You will be redirected to the front with an interface to manage your sprite. Remember to only include what stays between pages, the variable parts (like a product list or slideshow) should not be integrated to the sprite. Select only the pictures that stays between pages. Note: you will be the only one able to access this interface (session). IMPORTANT: when creating the sprite, make sure "full page cache" is not enabled. Interface: the system proposes several types of Sprite

Type of sprite Each type of sprite lists the images to be sprited. You can pass over the links with your mouse to view the images in question. These types of sprite are calculated according to your integration and normally r educe offset errors. Create your own sprite You can also create your own sprite by clicking "new sprite". Simply use your mouse to move the image into the new window. Create your sprite From the top, click "makesprite" for each sprite configured or click "make all" for all sprite. You will find the request and size increase in green on the top left-hand side. At that very moment, the sprite is directly applied to your site. So, if there are differences or it isn't to your liking and you don't want to go back to the drawing board -> simply reload the page. Export CSS If everything is to your liking, click "Export CSS" to export the new sprite coordinates to the CSS.

CDN What is this? This functionality transfers your media (img, js, css) to a CDN (self or FTP) and rewrites your media URLs with the CDN URL. Consequently, the server that executes the php and the one that delivers static content can be different. Access: From your Magento BackOffice, go to System> Nitrogento>CDN Config Interface Component details Component Upload to CDN button Enable/disable action CDN line Description Used to create your Sprite, refer to procedure below Used to respectively enable, disable, or refresh sprite optimization. Used to access CDN config by clicking it

Configuration of CDN Using a CDN has two main goals: Speeding up loading by allowing your browser to simultaneously pull resources from multiple hosts. The value is browser-dependent but, on average, browsers are set to pull resources with no more than 8 simultaneous connections per server (per CNAME). Providing resources that are close to your user means that your content is delivered from a place that optimizes transfer speed and latency because it s geographically located close to your user. Both are important, even if the first point is more so than the second. For example, on a demostore, there are 53 elements to get. If you spread them around 4 CDN, you will get 8 resources per hostname and therefore get 32 elements at once and the 21 other ones in a second pass, instead of doing 7 passes. Component details Component Use self CDN Path of your Magento Path of your cdn Description Enables self CDN or not Specifies the absolute path of your Magento site Specifies the absolute path of your CDN site Configuration of FTP CDN

Component details Component Use ftpcdn Use passive mode Hostname, username, password Description Enables FTP CDN or not Puts FTP connection in passive mode or not URL, Identifier, and password of your FTP connection. End of the procedure Return to the cdn configuration grid page and click the "Upload To CDN" button. Depending on the CDN (self or ftp), NitroGento will transfer all your media to the CDN server. You can view the file list from this new window.

Advanced CDN configuration There are many ways to setup your CDN system. Nitrogento actually only automates a classic CDN but Akamaï and MaxCDN should soon be supported. Here is a simple way to set up your own CDN. First, choose whichever Httpd service you like. Apache is good, but Lighttpd, Nginx, Zeus, and others can also do a very decent job. Let s assume you choose Apache. Declare the CNAMES pointers in your DNS. This could look like this: www IN CNAME nitrogento.fr. cdn 3600 IN A 195.5.236.93 cdn1 3600 IN CNAME cdn cdn2 3600 IN CNAME cdn cdn3 3600 IN CNAME cdn cdn4 3600 IN CNAME cdn If you are using named (bind), you should remember to change the zone serial number and then issue an rndc reload [your-zone-name] Next, you need to configure Apache to handle your CDN Vhost. Files are usually in /etc/apache2. Edit your config file and configure it. Here is an example. Remember to change values to suit your needs, settings, hostname, and directory path:

<VirtualHost *:80> ServerAdmin webmaster@nitrogento.com ServerName cdn.nitrogento.com DocumentRoot /var/www/nitrogento/cdn <Directory /var/www/nitrogento/cdn> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> LogLevel warn ErrorLog /var/log/cdn.nitrogento.error.log CustomLog /var/log/cdn.nitrogento.access.log Full </VirtualHost> <IfModulemod_deflate.c> SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/* BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bmsie!no-gzip!gzip-only-text/html SetEnvIfNoCaseRequest_URI \.(?:gif jpe?g png)$ no-gzipdont-vary SetEnvIfNoCaseRequest_URI \.(?:exe t?gz zip bz2 sit rar)$ no-gzipdont-vary SetEnvIfNoCaseRequest_URI \.pdf$ no-gzipdont-vary SetEnvIfNoCaseRequest_URI \.(?:gif jpe?g png)$ no-gzip </IfModule> <IfModulemod_headers.c> Header append Vary User-Agent env=!dont-vary </IfModule> FileETag Size <IfModulemod_expires.c> ExpiresActive On ExpiresDefault "modify plus 1 year" ExpiresByType image/jpg "modify plus 1 year" ExpiresByType image/jpeg "modify plus 1 year" ExpiresByType image/png "modify plus 1 year" ExpiresByType image/gif "modify plus 1 year" AddType image/x-icon.ico ExpiresByType image/ico "modify plus 1 year" ExpiresByType image/icon "modify plus 1 year" ExpiresByType image/x-icon "modify plus 1 year" ExpiresByType image/vnd.microsoft.icon "modify plus 1 year" ExpiresByType text/css "modify plus 1 month" ExpiresByType text/html "modify plus 1 day" ExpiresByType application/xhtml+xml "modify plus 1 day" ExpiresByType application/javascript "modify plus 1 month" ExpiresByType text/javascript "modify plus 1 month" ExpiresByType application/x-javascript "modify plus 1 month" ExpiresByType application/x-shockwave-flash "modify plus 1 month" </IfModule>

You can either do this on the same server or use a server mainly done to serve static content, it s up to you. The settings around Expire / Gzip / Etags and headers are important if you want to get a maximized score on your GTMetrix / Yslow / Pagespeed ranking and even if you want to fully optimize. Since the resources are served from a different CNAME / Server, the.htaccess of Magento s directory won t be applied to the CDN resources so you have to put them directly in the CDN Vhost configuration. Restart your apache You can basically make a symlink (ln s) from /var/www/nitrogento/cdnto /var/www/nitrogento/cdn1, cdn2, cdn3, cdn4. This is a very basic, yet efficient, way to do it. Once you know more about this or if you operate a very high traffic site, you ll probably want to split the CDN directory and pointers between the different servers. Go to your BackOffice and select the CDN option in Nitrogento Menu entry. Activate it and specify the required fields to allow Nitrogento to spread your resources across the CDN spaces.

Advanced configuration of the module Custom block caching & hooks Tip for blocks Before caching a block, verify in the code that its method _preparelayout() does not load any collections, in fact, this method will be systematically called whether the block is cached or not. The result will be that caching this block will not improve performance by very much. If you want to load a collection, prefer overwriting the method _beforetohtml() General information on the Magento Cache Magento uses the API Zend_Cache to cache components. To cache a component you must provide it with a cache key (which will be used to identify a component in the cache) and a lifetime (beyond which the object will no longer be taken from the cache then reloaded). BlockhtmlHelper Cache To build a cache key, each Nitrogento blockhtml cache entry config must define a helper; this helper must overwrite the abstract class: NBSSystem_Nitrogento_Helper_Cache_Blockhtml_Abstract Methods to overwrite Description Examples buildcachekey(mage_core_block_abstract $block) This method is used to build the cache key Product page: to cache the block, a generic cache key must be built to which the product identifier is added. buildcachetags(mage_core_block_abstract $block) isblockcachable(mage_core_block_abstract $block) This method is used to provide a group identifier to be able to easily delete cache entries. Verification made Nitrogento side to indicate whether the block is cacheable or not. Product page: here, common cache tags are added, then the cache tag specific to the product is added; consequently, if the product is modified/deleted BO side, this entry will be removed from the cache. Product page: we can cache or retrieve this block from the cache if, for example, no message is displayed on this page. This method is used for filtering.

FullpageHelper Cache To build your cache key, each Nitrogento fullpage cache entry config must define a helper; this helper must overwrite the abstract class: NBSSystem_Nitrogento_Helper_Cache_Fullpage_Abstract Little peculiarity, here the helper does not manage the cache key, the cache key of a page is actually its complete url. Methods to overwrite Description Examples buildcachetags() This method is used to provide a group identifier to be able to easily delete cache entries. Product page: here, common cache tags are added, then the cache tag specific to the product is added; consequently, if the product is modified/deleted BO side, this entry will be removed from the cache. ispagecachable() Verification made Nitrogento side to indicate whether the block is cacheable or not. CMS page: CMS pages are all cached, if you want to make an exception for a page in particular, this is the method that can manage it.

Example of a concrete case of adaptation Problem My store named "boutique1" runs with Magento and wants to install the Nitrogento module. It has the following specificities: - A sticker, indicating whether the product displayed is already in the customer's shopping cart, is placed on the product pages. - We don't want the CMS page of the url http://www.boutique1.fr/mapagecms1 to be cached. Naive resolution of the problem We could simply disable the config entries for the blockhtml portion of the product pages and those for the fullpage portion of the CMS pages, but we would lose out in terms of performance. Technical resolution of the problem I'm creating a Boutique1_NitrogentoExt module that will overwrite helpers chosen from Nitrogento. The Boutique1_NitrogentoExt.xml file must include a dependence on the NBSSystem_Nitrogento module; you should see something like this: <?xmlversion="1.0"?> <config> <modules> <Boutique1_NitrogentoExt> <active>true</active> <codepool>local</codepool> <depends> <NBSSystem_Nitrogento> </depends> </Boutique1_NitrogentoExt> </modules> </config> You create an helper to manage the product sticker problem: <?php classboutique1_nitrogentoext_helper_cache_blockhtml_catalog_product_view_impl extends NBSSystem_Nitrogento_Helper_Cache_Blockhtml_Catalog_Product_View_Impl { public function buildcachekey($block) { return parent::buildcachekey($block). '_'. $this->iscurrentproductincart(); } private function iscurrentproductincart() { if(mage::registry('current_product')) { returnin_array(mage::registry('current_product')->getid, Mage::getModel('checkout/cart')->getQuoteProductsIds())? 1 : 0; } else { return0; } } }

Checking your settings & scores with Gtmetrix, Yslow, and/or Pagespeed First, you have to know that Pagespeed auto detects the use of a CDN but Yslow doesn t. If you want your CDN to be understood from Yslow, you either have to use one that is very well known or declare it in your settings. In Firefox, this is done by opening a new tab, type: about:config Then move to extensions.yslow.cdnhostnames and type your CDN CNAME, separate using a comma. Example: cdn.nitrogento.com,cdn1.nitrogento.com,cdn2.nitrogento.com,cdn3.nitrogento.com,cdn4.nitrogento. com In GTmetrix, you will have to create an account and then go to: http://gtmetrix.com/dashboard.html#prefs-modal Results Activating every optimization of Nitrogento should allow you to load 300 Kb in 1.2 seconds with 26 requests on a Magento demostore, instead of 2.7 seconds, 359 Kb, and 52 requests. Usually, FPC and Block caching allow serving 6 to 8 times more pages per day on the same server. Returning visitors should get their page faster since their browsers' cache will be loaded; we usually obtain a 4 Kb download with only 2 HTTP requests instead of 5 Kb and 52 HTTP requests. We usually recommend using Funkload to bench your websites performances, more efficient than siege, takes Apdexindice into consideration and is far more realistic than Apache Bench. You can find more precise benchmarks on www.nitrogento.com Contacts / Support If you have a problem with this extension, you can open a ticket in our incident support system by sending an e-mail to support@nitrogento.com. Please provide as many specifics regarding your issue as you can and attach a screen shot whenever possible. This e-mail is only provided for support purposes and is not meant to provide help with product configuration; consequently, any requests on how to configure Nitrogento will not be answered via this path. Feel free to mention documentation problems or whatever is not detailed enough at: doc@nitrogento.com

You can direct other questions or provide your feedback here: contact@nitrogento.com Credits & copyrights Nitrogento is a Magento extension created based on an original concept of NBS System in 2010. NBS System is in charge of any questions related to this extension and owns all code, concepts, names, brands, logos, websites, domain name and rights for this product. Agence DnD and The Ecommerce Academy developed the extension for NBS System.