Magento的的mod_pagespeed [英] mod_pagespeed magento

查看:163
本文介绍了Magento的的mod_pagespeed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人使用了Magento的店的mod_pagespeed?

Has anyone used mod_pagespeed in a magento store?

这是否破坏任何东西(如自定义优化等?)

Does it break anything (like custom optimizations etc?)

很感兴趣使用它,但是从资源的运气患...

Very Interested of using it, but suffering from luck of resources...

推荐答案

您有兴趣后我,所以我跟的mod_pagespeed发挥各地,我没有做任何详细的测试,也没有测量。我一般的IM pression是冷漠,好处是可以忽略不计来检测不到。最大的hinderence到Magento的一贯并将继续是它是需要年龄加载和实例化的PHP类的质量。 Magento的是不是真的犯的不良做法像内联CSS所以有一点空间,这个MOD做。有了这些警告放在一边,这里是我的经验。

Your post interested me so I have played around with mod_pagespeed, I didn't do any detailed testing nor measurements. My general impression was indifference, benefits were negligible to undetectable. The greatest hinderence to Magento has always been and continues to be it's mass of PHP classes that take ages to load and instantiate. Magento isn't really guilty of bad practices like inline CSS so there is little room for this mod to do. With those caveats aside here is my experience.

首先谷歌已经打包的mod_pagespeed非常好,他们提供的源代码以及二进制文件,但二进制文件安装程序注册仓库所以它会保持更新。这是我希望更多的厂家会做是理所当然的事。最明智的设置是默认设置,以便它工作的时候了,没有任何调整。

First off Google have packaged mod_pagespeed very well, they provide source as well as binaries, but the binaries installer registers repositories so it'll stay updated. Something I wish more producers would do as a matter of course. The most sensible settings are the default so it works right away without any tweaking.

配置被分成适度名单过滤器您应该通读看到技术改进的是什么。我只选择了启用两种 - remove_comments和collapse_whitespace - 这在HTML的大小作出了显着性差异,并没有破坏任何东西。

Configuration is broken into a moderate list of filters which you should read through to see exactly what improvements are made. I only chose to enable two - "remove_comments" and "collapse_whitespace" - which made a marked difference in HTML size and didn't break anything.

extend_cache - 默认。我喜欢它的概念,并认为这是维护文件版本的一个很好的方式。有用的。

extend_cache - On by default. I like it's concept and think it's an excellent way of maintaining file versions. Useful.

outline_css &安培; outline_javascript - 默认。并不真正相关。无害的。

outline_css & outline_javascript - On by default. Not really relevant. Harmless.

combine_css &安培; rewrite_css - 基本上是一样的Magento的内置函数和几个扩展也包括随时欢迎的 Fooman Speed​​ster的。你可能会认为这使得多余的,但我喜欢它,因为它是卸载PHP执行到本机code,由于阻止缓存的差异可能是微不足道的,但对我来说足够了。有用的。

combine_css & rewrite_css - Essentially the same as Magento's built in function and several extensions too, including the always welcome Fooman Speedster. You may think this makes it redundant but I like it as it is offloading PHP execution to native code, thanks to block caching the difference may be minuscule but it's enough for me. Useful.

inline_css &安培; inline_javascript - 补到 outline_css &安培; outline_javascript 键,在默认情况下。请问这是我没想到的增加页面大小。理应减少请求的数目,但如果有什么的CSS / JS文件被合并?我希望这只是从缓存源删除内容。不想要的。

inline_css & inline_javascript - Complement to outline_css & outline_javascript and on by default. Does increase page size which I wasn't expecting. Supposedly to reduce the number of requests but what if css/js files are being combined? I expect this is just removing content from a cacheable source. Not wanted.

collapse_whitespace &安培; remove_comments - 默认关闭,但非常值得拥有的。打造一个可测量的差异,以字节即使COM pression被转移。有用的。

collapse_whitespace & remove_comments - Off by default but is worth having on. Makes a measurable difference to bytes being transferred even after compression. Useful.

combine_heads - 修复了可能永远​​不会想出了在这方面的一个问题。无害的。

combine_heads - Fixes a problem that will probably never come up in this context. Harmless.

elide_atttributes - 我没有找到任何与此问题,但只有时间会告诉我们,暂时我会认为它是无害的。有用的。

elide_atttributes - I didn't find any problems with this but only time will tell, for the moment I'll assume it's harmless. Useful.

rewrite_javascript - 这基本上是jsmin和谷歌自己的评论警告它作为风险。由于自带的Magento既处于测试阶段,并已引起了我在我考虑过这个明智的建议,并把它很好仅在过去的问题JS minifier。不想要的。

rewrite_javascript - This is basically "jsmin" and Google's own comments warn it as risky. Since the js minifier that comes with Magento is both in beta and has caused me problems in the past I considered this sage advice and left it well alone. Not wanted.

rewrite_images - 我会记住这一条短。有用的。

rewrite_images - I'll keep this one short. USEFUL.

insert_img_dimensions - 别的东西的Magento并没有真正有一个问题,所以并不真正需要修复。但它是无害的,可以帮助网页渲染更加流畅。有用的。

insert_img_dimensions - Something else Magento doesn't really have a problem with so doesn't really need fixing. But it's harmless and might help pages render more smoothly. Useful.

ModPagespeedImgInlineMaxBytes - 关闭的小图片为数据:URI的内容。我不相信这是有猫腻UA版本检查,你无法确定代理以外的控制不会起到了错误的浏览器。谷歌认为它是低到中度风险,但我不会给它这样的机会。不想要的。

ModPagespeedImgInlineMaxBytes - Turns small images into data:uri content. I don't trust this as there is a tricky UA version check and you cannot be sure proxies outside your control won't serve to the wrong browsers. Google seem to think it is "low to moderate" risk but I'll not give it that chance. Not wanted.

remove_quotes - 打破了几个字节的增益W3C验证。从理论上讲它应该是无害的,但我不相信它。不想要的。

remove_quotes - Breaks w3c validation for the gain of a few bytes. In theory it should be harmless but I don't trust it. Not wanted.

move_css_to_head &安培; add_head - 会破坏一些JavaScript,但Magento的较强壮,然后再Magento的一般不作这样的这就需要纠正学校的男孩错误。无害的。

move_css_to_head & add_head - Can upset some javascript but Magento is hardier than that, then again Magento generally doesn't make school boy errors like this which need correcting. Harmless.

各种重写,reorderings和修复获得发展的方式。由浏览器报告行号不一定会在源$ C ​​$ C相同。为此,我绝不会用它来做什么,但一个生产服务器。

The various rewrites, reorderings and fixes get in the way of developing. A line number reported by the browser won't necessarily be the same in your source code. For this reason I would never use it for anything but a production server.

这样做的好处是对于像Magento的一个PHP驱动的应用程序如此之小。我们有多少人会为了节约成本另行通知管理服务器拥有数百万每天游客呢?我知道我可以用老式编程获得更大的节约。块和全页面缓存拥有所有最好的效果。

The benefit is so small for a PHP-driven application like Magento. How many of us are going to be administering servers with millions of daily visitors in order to notice the cost savings? I know I can get much greater savings by old fashioned programming. Block and full page caching have the best effect of all.

不过,任何改善是值得欢迎这就是为什么我会在未来考虑了。托管在同一台服务器上的任何其他网站会以自己的方式获益。结果
准确配置将根据具体情况逐案进行判断,但一般我想我会做以下几点:

Still, any improvement is welcome which is why I will be considering it in future. Any other sites hosted on the same server will benefit in their own ways.
The exact configuration will be judged on a case-by-case basis but generally I think I will be doing the following:


  • 在MODS的可用/ pagespeed.conf:

  • In mods-available/pagespeed.conf:

ModPagespeedDisableFilters inline_css,inline_javascript,rewrite_javascript,remove_quotes
ModPagespeedEnableFilters collapse_whitespace,remove_comments

ModPagespeedDisableFilters inline_css,inline_javascript,rewrite_javascript,remove_quotes ModPagespeedEnableFilters collapse_whitespace,remove_comments

这篇关于Magento的的mod_pagespeed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆