What're the best practices for CSS/HTML minimizing? I'm looking for server side tools to fasten the interaction with the browser.
Can you give me a hint as to how I add it to my project?
konzepz
2009-09-01 23:53:18
depends on what you're using for a setup- but here is some general knowledge and setup of it. http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
Ryan
2009-09-01 23:55:07
+1
A:
Minifying css and javascript can help. Using css sprites for graphic images like backgounds, icons and such reduce the number of requests to the server.
Tomsky
2009-09-01 23:56:44
+4
A:
The single best tool is probably server-side compression. You can enable this globally in Apache using mod_deflate. Just make sure mod_deflate is loaded, and stick this in the bottom of your httpd.conf file:
# mod_deflate for server-wide output compression.
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
#Header append Vary User-Agent env=!dont-vary
All static and dynamic content will then be served compressed to browsers that support it.
Other modern web servers will support this as well I'm sure, you'd just have to take a look at their docs to find out how to enable it.
zombat
2009-09-02 00:00:47