Nico Knoll Posted February 21, 2014 Posted February 21, 2014 Hey, is it possible to activate gzip compression somehow? Greets, Nico
SiNNuT Posted February 21, 2014 Posted February 21, 2014 Not really a PW thing. You generally enable this via your server config. Have a look at the html5 boilerplate server configs https://github.com/h5bp/server-configs
horst Posted February 21, 2014 Posted February 21, 2014 also worth a look: http://processwire.com/talk/topic/3812-htaccess/?p=37295 2
pwired Posted February 21, 2014 Posted February 21, 2014 you can zip and unzip in your cpanel or do it your self with pclzip.lib.php and your own php script.
SiNNuT Posted February 21, 2014 Posted February 21, 2014 I don't think that's what Nico is talking about pwired. I think it's about getting your webserver to send compressed html/css/js over the line via mod deflate or alternatives. 2
pwired Posted February 21, 2014 Posted February 21, 2014 Yes I guess you are right about that. We'll I can't delete my post, forum doesn't allow that, but I can stripe it
Nico Knoll Posted February 22, 2014 Author Posted February 22, 2014 Well Horst link is quite good I guess
SiNNuT Posted February 22, 2014 Posted February 22, 2014 Definitely, but also check out the h5bp .htaccess There are some of the same rules but also some other nice stuff. 1
Macrura Posted February 23, 2014 Posted February 23, 2014 i use this, which was posted by willyc somewhere, just pulled it from my code snippets: what.i use this is good it does.work top {not buttock}, of htaccess u will.put it . enjoy <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/octet-stream "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" </IfModule> <IfModule mod_headers.c> <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> <FilesMatch "\\.(css)$"> Header set Cache-Control "max-age=2692000, public" </FilesMatch> <FilesMatch "\\.(js)$"> Header set Cache-Control "max-age=2692000, private" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> Header unset ETag Header append Cache-Control "public" </IfModule> <IfModule mod_deflate.c> AddOutputFilter DEFLATE js css AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> 2
kongondo Posted February 23, 2014 Posted February 23, 2014 @Macrura - that was the post horst linked to ;-) 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now