kindly suggest me for page speed extension for magento. Because my magento website loading very slowing due to javascript and css codings
-
2I recommend you to add more specific data to your questions. I think in just saying any free page speed extension it doesn´t really help you. What is slow on your site? Are the lots of images and so on. Do you want to minify your css and js or what are you planning to do? – seb Feb 19 '15 at 11:06
-
2I agree with Thomas. Can you be more specific in your questioning? For instance, if you really want a "page speed" extension, you perhaps are referring to the Google PageSpeed tool, which is already available online. You might also be interested in Fooman Speedster? Otherwise, if the application itself (so Magento) is slowing you down, you might be looking into profiler tools like AOE Profiler, New Relic, CommerceBug and so on. – Jisse Reitsma Feb 19 '15 at 11:13
2 Answers
You can merge the CSS and JS by going to the admin panel, then System > Configuration > Developer and setting the following dropdowns to yes

After that please flush your cache. Optionally you can also turn on compression for these files in your .htaccess file located in the webshops root directory (accessible via FTP). This will deliver the files even faster to the users browser.
Add the following in the .htaccess file
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
Next to that you can also make sure the files stay cached for a long period of time in the users browser. This means the next time they visit the webshop they use their local cached version instead of downloading the file again. This can also be done by adding the following to your .htaccess
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
I've also added images and favicon in there. These settings should make your webshop load faster.
- 37,528
- 5
- 80
- 148
-
it's worth noting that merging css/html can backfire if you have a lot of variation in terms of CSS or JS which is added to your pages – STW Sep 30 '15 at 20:48
-
In case of a large number of products like 50K counts, merge the CSS and JS may lead to the collapse of the CSS and js design in the website, how to deal with this issue? – Gem Mar 26 '19 at 11:52
- Try to merge CSS and JS byon the admin panel
System > Configuration > Developer(Be careful with the JS, the site stop working right in my case). Then activate Gzip Compression (i can't add more than 2 links :( google it ;) )
The thing that change everything for me it's changing the cache module. Magento use a cache module witch use the Zend_Cache library and create a huge numbers of files that makes the site terrible slow. You can easy replace it with this:
Cm_Cache_Backend_File
or even better, magento is prepeared to work with Redis. With this feature the cache goes to RAM instead the File System.
Good luck!
- 138
- 1
- 8