小测PHP空白量gz压缩输出比较

  原始字节 有效字节 冗余空白量(包含\t\r\n\s)
未压缩 2443 2004 439
ob_gzhandler 417 383 34
压缩比 17% 19% 7.8%

诚然,虽然不是很准。但至少说明了2件事。

1)空白字符的压缩效率的确很高。

2)做HTML清理与不做HTML清理差距的确有,但是不是很大。但是做Gz和不做gz差距不仅有,而且的确很大。

因此,如果不在前端做html清理也无所谓。但是不做gz就不能无所谓了。

不过偶还是考虑用obstart再obendclean做MVC的清理试试。

3 comments

  1. coachwiburgoutlet 说道:

    我来占个沙发 呵呵

  2. Val Prichard 说道:

    I simply want to mention I am new to blogs and actually loved this web site. Very likely I’m want to bookmark your blog post . You really have excellent article content. Regards for sharing your website page.

  3. Diamond Mital 说道:

    Nice post. I study one thing more difficult on completely different blogs everyday. It will always be stimulating to read content from different writers and practice just a little something from their store. I’d desire to use some with the content material on my weblog whether you don’t mind. Natually I’ll give you a link on your net blog. Thanks for sharing.

发表评论

电子邮件地址不会被公开。