Gzip compression - pre-compression vs. on-the-fly

mike mike503 at gmail.com
Mon Apr 14 12:06:18 MSD 2008


okay, so mainly just housekeeping.

the server itself does not care either way, it's back to "up to you to
update the files, or your results will vary"

perhaps this should be a better note on the wiki? it's a bit vague right now.

On 4/14/08, Dave Cheney <dave at cheney.net> wrote:
> That notice is probably for two reasons
>
> 1. you have to deploy a patch to a css or js file on your production server,
> you forget to update the .gz version so browsers with different
> Accept-Encoding: headers see different results
>
> 2. I have noticed that nginx uses the last-modified timestamp of the .gz
> file if it delivers that file, this may or may not be a problem in your
> setup.
>
>
> indy:~ dave$ curl -I
> http://www.redbubble.com/javascripts/prototype.js
> HTTP/1.1 200 OK
> Server: nginx
> Date: Mon, 14 Apr 2008 07:57:43 GMT
> Content-Type: application/x-javascript
> Content-Length: 75865
> Last-Modified: Thu, 10 Apr 2008 02:26:50 GMT
> Connection: keep-alive
> Cache-Control: public,max-age=7776000
> Accept-Ranges: bytes
>
> indy:~ dave$ curl -I --compress
> http://www.redbubble.com/javascripts/prototype.js
> HTTP/1.1 200 OK
> Server: nginx
> Date: Mon, 14 Apr 2008 07:57:48 GMT
> Content-Type: application/x-javascript
> Content-Length: 20603
> Last-Modified: Fri, 11 Apr 2008 22:59:02 GMT
> Connection: keep-alive
> Content-Encoding: gzip
> Cache-Control: public,max-age=7776000
>
> Cheers
>
> Dave
>
> On 14/04/2008, at 5:26 PM, mike wrote:
> gzip_static is what controls the precompression checks right?
>
> The wiki says this:
> "You should ensure that the timestamps of the compressed and
> uncompressed files match."
>





More information about the nginx mailing list