Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-23-2012, 07:47 PM   PM User | #1
HDRebel88
Regular Coder

 
Join Date: May 2011
Posts: 112
Thanks: 11
Thanked 5 Times in 5 Posts
HDRebel88 is an unknown quantity at this point
Turning on GZip Compression for CSS and JS

How would I go about turning on GZip for css and js files only, via .htaccess and httpd.config?

Every method I've seem to find ends up de-linking my css files, so I end up with a non-styled site.

I'm running a second domain for all of my static files; that's the domain I've been uploading my .htaccess to.

Here's what I have right now, and according to Google PageSpeed it does nothing:

Code:
Header unset ETag
FileETag None
<filesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
Header unset Last-Modified
Header set Cache-Control "max-age=864000, public"
</filesMatch>

<ifModule mod_deflate.c>
<filesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
HDRebel88 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:33 AM.


Advertisement
Log in to turn off these ads.