Avatar

Obsolete? (Design/Themes)

by Alfie ⌂, Vienna, Austria, Monday, November 10, 2014, 14:35 (3448 days ago) @ Auge

Hi Auge,

I guess this attempt to reduce the amount of data transferred for narrow-bandwidth connections is obsolete and makes only the life of admins miserable. AFAIK nowadays most servers are by default configured to deliver gzipped-content (BTW, here as well – the main page as of today: gzipped: 5.49 KiB / decoded: 37.60 KiB = 85% decrease).

If gzip is not activated, try in .htaccess:

<IfModule mod_deflate.c>
  <FilesMatch "\.(php|html|htm|xml|css|gss|js|txt|svg|csv|xls)$">
    SetOutputFilter DEFLATE
  </FilesMatch>
</IfModule>

Note: Not meaningful to include content which is already compressed (binary data like images, etc).

If one wants to efficiently reduce the amount of data transferred, one can additionally play with cache-control, which is set here to Apache’s default of 300 seconds). This is what I use in my .htaccess:

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 300 seconds"
  ExpiresByType image/png "access plus 2 months"
  ExpiresByType image/gif "access plus 2 months"
  ExpiresByType image/jpeg "access plus 2 months"
  ExpiresByType text/javascript "access plus 2 months"
  ExpiresByType image/x-icon "access plus 2 months"
  ExpiresByType text/css "access plus 1 week"
</IfModule>

That’s already conservative; if you don’t change regularly icons and css you could even opt for a longer expiration period.

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)


Complete thread:

 RSS Feed of thread