Browsing articles in "Performance"
Jul 19, 2013
kalpesh

Magento tweak .htaccess for performance optimization

Tweak .htaccess for performance optimization in Magento. It will not sky rocket your website, but will show notable improvement. The default Magento .htaccess comes with performance optimization, but commented by default. I will show you here which lines to uncomment and improve the performance.

Compressing web pages with mod_deflate

The mod_deflate module allows the Apache2 web service to compress files and deliver them to browser that can handle them. With mod_deflate you can compress HTML, text or XML files by upto 70% of their original sizes! Thus, saving you server traffic and speeding up page loads.

Check your .htaccess file for below code, I have removed hashes before few lines to uncomment them for performance.

<ifmodule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter on all content
    SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary

</ifmodule>

Continue reading »

May 26, 2013
kalpesh

Magento performace optimization, Catalog URL Rewrite Management

If your Magento site is slow, then one of the reason can be because of Catalog URL Rewrites. You can check in the Magento Admin > Catalog > URL Rewrite Management. If you see the catalog rewrites are very large than expected as per total Categories and Products you have, this will create your site to be slow. This generally gets too large if you edit the categories/products and change it’s URL. Generally we keep on changing the product URL to optimize for search engines or to correct some typo in the link. Magento saves all the previous category and product URLs even if it is changed many times, resulting in more number of URL rewrites in database. I have seen in one of the project, where total SKUs were near to 4,00,000 while the URL Rewrites were near to 46,00,000 with just one website and store!

Magento Catalog URL Rewrite Management
Continue reading »

Welcome to my Blog

Kalpesh MehtaHelping Magento developers in their day-to-day development problems since 2011. Most of the problems and solutions here are my own experiences while working on different projects. Enjoy the blog and don't forget to throw comments and likes/+1's/tweets on posts you like. Thanks for visiting!

Certifications

Honor

Recognition

Magento top 50 contributors

Magento top 50 contributors

Contributions