Giter Club home page Giter Club logo

pagespeed's Introduction

Magento Google PageSpeed Optimization Extension

This extension should help, to fulfill the requirements of the tool Google PageSpeed Insights.

Current features

  1. 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
  2. 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
  3. Backend configuration option to exclude specific js tags/units or css tags/units from the move. (regex pattern)

Compatibility

From Magento 1.5.x to Magento 1.9.x .

Backend Configuration

All modules (Pagespeed_Js, Pagespeed_Css) are disabled by default.

Configuration path: System > Configuration > ADVANCED > Pagespeed

How it works ?

Simple parse the final html stream on the event "controller_front_send_response_before".

What about performance/parsing time ?

On our local hardware the html parsing requires a maximum of 4 milliseconds.

Requirements from PageSpeed Insights and planned features

  1. Eliminate render-blocking JavaScript and CSS in above-the-fold content (feature 1 & 2)
  2. Prioritize visible content (possible with feature 3)

Requirements from PageSpeed Insights which are covered by 3rd party extensions

  1. Minify CSS
  2. 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.)
  3. Optimize images
  4. Minify HTML

Requirements from PageSpeed Insights which are covered by your server admin :)

  1. Enable compression
  2. Avoid landing page redirects
  3. Leverage browser caching
  4. Reduce server response time

Goal

Goal

Notices

  1. 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.
  2. Test before use. There are also "great" things like multiple </body> tags, that will crash the party.
  3. Front Page Cache: Test it. Look that our event "controller_front_send_response_before" is called before your FPC-Extension starts to observe.
  4. If an Javascript use the outdated "document.write", it must be excluded by the regex pattern.

Developers

Special thanks

Features inspired by

Licence

OSL - Open Software Licence 3.0

Copyright

(c) 2015 mediarox UG (haftungsbeschraenkt) (http://www.mediarox.de)

pagespeed's People

Contributors

sfritzsche avatar bencorlett avatar sanderkwantes avatar csssucks avatar

Watchers

James Cloos avatar Quinn Diggity avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.