h5bp / html5-boilerplate

A professional front-end template for building fast, robust, and adaptable web apps or sites.
https://html5boilerplate.com/
MIT License
56.5k stars 12.24k forks source link

Gzip cookie solution from even faster websites #15

Closed nimbupani closed 13 years ago

paulirish commented 14 years ago

http://googlecode.blogspot.com/2009/11/use-compression-to-make-web-faster.html

paulirish commented 14 years ago

http://www.stevesouders.com/blog/2010/07/12/velocity-forcing-gzip-compression/ ^ ^ ^ ^ ^

paulirish commented 14 years ago

well.... http://wordpress.org/extend/plugins/force-gzip/ two problems.. its super PHP-y.. and its GPL. is this possible with mostly apache config ?

Garowetz commented 14 years ago

Looking over the code it looks like it's possible with js at the bottom of the index and setting the headers of the gzip.html via .htaccess

I'm fiddling with different methods now

paulirish commented 14 years ago

The difficult trick is that the JS would have to be included only for that select audience. I think apache includes could help.

Good luck!

paulirish commented 14 years ago

Garowetz, have you identified a vector by which this could be done within the scope of standard boilerplate?

Garowetz commented 14 years ago

Not yet, I have been testing different methods and seeing if there is something we can incorporate, right now it's all coming back to a php script along with .htaccess. Which isn't bad but we haven't added any server side code yet ... aside from the build script

Should I pursue?

paulirish commented 14 years ago

From mathias byenens a bit ago

SetEnvIf HTTP_COOKIE "gzip" no-gzip dont-vary 

may be worth considering..

paulirish commented 13 years ago

okay we finally got something i think we can move on:

http://calendar.perfplanet.com/2010/pushing-beyond-gzipping/

basically forces gzip for mangled headers. good enough for me.

paulirish commented 13 years ago

I'm very happy with our new gzip handling via that perfplanet post.. so i'm gonna close this finally. \o/