4 ms·
Regarding gzipping, you don't want your webserver doing this on the fly. At least in nginx, you can tell the webserver to load pre-gzipped files, I'm sure apach
by yummyfajitas 15y ago
Regarding gzipping, you don't want your webserver doing this on the fly. At least in nginx, you can tell the webserver to load pre-gzipped files, I'm sure apache has something similar.
Put this into nginx.conf: gzip_static on;
Then run this command in /var/www to gzip your content: find . -name "*' + ext + '" -print | xargs -I filename echo "gzip -c filename > filename.gz" | sh
This is a small win (reduced cpu/disk IO), but at two lines it's an even smaller cost.
Also, if you use django mediagenerator, it will handle a lot of this stuff for you.
http://www.allbuttonspressed.com/projects/django-mediagenerator http://www.allbuttonspressed.com/projects/django-mediagenera...
- ErikD 15y agoKeep in mind that serving already properly minimized png, jpg and gif images with gzip can actually increase their size.