This extension should help, to fulfill the requirements of the tool Google PageSpeed Insights.
- Move all Javascript tags (head & inline) to the bottom.
({stripped_html}{js}</body></html>)
- including conditional js units
(<!--[if lt IE 7]>{multiple js tags}<![endif]-->)
- including external js tags
- including "inline" js tags
- including conditional js units
- Move all CSS tags (head & inline) to the bottom.
({stripped_html}{css}</body></html>)
- including conditional css units
(<!--[if lt IE 7]>{multiple css tags}<![endif]-->)
- including external css tags
- including inline css tags
- including conditional css units
- Backend configuration option to exclude specific js tags/units or css tags/units from the move. (regex pattern)
From Magento 1.5.x to Magento 1.9.x .
All modules (Pagespeed_Js, Pagespeed_Css) are disabled by default.
Configuration path: System > Configuration > ADVANCED > Pagespeed
Simple parse the final html stream on the event "controller_front_send_response_before".
On our local hardware the html parsing requires a maximum of 4 milliseconds.
Eliminate render-blocking JavaScript and CSS in above-the-fold content(feature 1 & 2)Prioritize visible content(possible with feature 3)
- Minify CSS
- Minify JavaScript
- Both are covered by Speedster Advanced by Fooman (note: that we have no experience with this extension, but Fooman seems to be a good guy.)
- Optimize images
- Image Optimization(note: no experience too.)
- Minify HTML
- Based primary on Minify CSS and Minify JavaScript.
- Enable compression
- Avoid landing page redirects
- Leverage browser caching
- Reduce server response time
- There is also a great tool called PageSpeed Module for common webservers like apache and nginx. If you have the opportunity: Use it, but read the manual.
- Test before use. There are also "great" things like multiple
</body>
tags, that will crash the party. - Front Page Cache: Test it. Look that our event "controller_front_send_response_before" is called before your FPC-Extension starts to observe.
- If an Javascript use the outdated "document.write", it must be excluded by the regex pattern.
- Steven Fritzsche @de_mediarox
- Thomas Uhlig Xing
- Sander Kwantes sanderkwantes
- Adam Johnson [adamj88] (https://github.com/adamj88)
- Ben Corlett [bencorlett] (https://github.com/bencorlett)
- Daniel Chicote Github
- Henk Valk Github
- Dan Stevens from Activ8
OSL - Open Software Licence 3.0
(c) 2015 mediarox UG (haftungsbeschraenkt) (http://www.mediarox.de)