3 ms·
Best practice for serving .css files is gzippped? Is this at the file level or on-the-fly by the web server? In any case, why is this considered best practice
by SageRaven 14y ago
Best practice for serving .css files is gzippped? Is this at the file level or on-the-fly by the web server? In any case, why is this considered best practice? (I ask as a sysadmin, not a web developer.)
- sambeau 14y agoGenerally on-the-fly by the web server, although you can, in theory, zip manually and serve. The big speed bottleneck when serving pages is the network so the smaller the file you send across the wire the faster your page will load. This goes for all the text mime-types: html, xml, css, javascript, text.
- icebraining 14y agoWhile most people do on-the-fly gzipping, I think that's it's best to just include static gzipping as part of the deployment process. Then you can use e.g. Nginx's HttpGzipStaticModule to serve the appropriate version.