His speed estimates are wrong, as he should have tested gzipping many small files instead of gzipping one large file. There is a significant difference.
Paul Buchheit: Make your site faster and cheaper to operate in one easy step
11–20 of 60 posts
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#12One scenario where using gzip might not be a good idea is when serving content less than 2-4 kB, like some thumbnails.
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#13His speed estimates are wrong, as he should have tested gzipping many small files instead of gzipping one large file. There is a significant difference.
Why? If you're setting up your website right, you should be serving 1 HTML file + 1 JS file + 1 CSS file + 1 image for each request, and the latter 3 should all be cached indefinitely. (At least for static chrome - if you've got thumbnails, videos, or flash games you can't exactly sprite those.) His test file was 146K, which seems on the high side for HTML only, but I'd imagine serving 1 small file is faster than ser…
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#14Earlier quoted context omitted.
Why? If you're setting up your website right, you should be serving 1 HTML file + 1 JS file + 1 CSS file + 1 image for each request, and the latter 3 should all be cached indefinitely. (At least for static chrome - if you've got thumbnails, videos, or flash games you can't exactly sprite those.) His test file was 146K, which seems on the high side for HTML only, but I'd imagine serving 1 small file is faster than ser…
1 image for each request? Are you putting all the images for each page into one image file, then cropping the needed region for each image on your page?
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#15That's only one of the needed steps. Adjust your headers so that static items are not reloaded frequently. Use versioned urls (e.g., /scripts/main.js?234) and update the versions only when you change the scripts or CSS. YSlow goes a long way in helping with that kind of stuff. The same applies for S3 uploads. You can pass cache headers in the upload request which will later be used on all downloads.
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#16One scenario where using gzip might not be a good idea is when serving content less than 2-4 kB, like some thumbnails.
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#17Umm I am confused. Is this about compressing the web page itself? I think what takes most of the time to load on my website is the advertisers rather than the content itself. So perhaps this is about large websites like amazon which have large detabases?
I think what he means is just enabling transportation of compressed data from server to client, regardless what you are transporting. The size of your page does not affect the benefits you achieve with this method, which is always less data being transported.
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#18One scenario where using gzip might not be a good idea is when serving content less than 2-4 kB, like some thumbnails.
Gzipping images is generally not a good idea. PNG/GIF/JPEG are already highly compressed and will probably grow in size if you attempt to gzip them.
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#19That's only one of the needed steps. Adjust your headers so that static items are not reloaded frequently. Use versioned urls (e.g., /scripts/main.js?234) and update the versions only when you change the scripts or CSS. YSlow goes a long way in helping with that kind of stuff. The same applies for S3 uploads. You can pass cache headers in the upload request which will later be used on all downloads.
Do you know something that can modify django templates that contain CSS & JS imports so that the linked version gets updated with each checked in change to the files?
Re: Paul Buchheit: Make your site faster and cheaper to operate in one easy step
#20eg a request for 'index.html' looks for 'index.html' and 'index.html.gz'. If the gz is there it uses that and sets headers accordingly.
Works incredibly well, and the deploy scripts just gzip things when they're pushed out to production.