Hi
I'm having problems getting CSS Gzip to work.
It does generate the .gz compressed version of the CSS file in /sites/default/files/css
It does generate a .htaccess file en the same folder, if so chosen.
I tried the "do not generate .htaccess" option, and manually modified the root .htaccess
I do have clean url's and public download method.
I flushed cache, logged out, ran cron, refreshed page, reinstalled, several times.
Yet YSlow still reports that the regular uncompressed .css file is served.
Any ideas what I have missed?
My drupal site is located at oldrup dot dk
PHP info is http://web5.gigahost.dk/phpinfo.php
Best regards
Bjarne
Comment | File | Size | Author |
---|---|---|---|
#20 | gzip_css.jpg | 60.66 KB | wadmiraal |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedCan I get a URL to an example site where it doesn't work?
Comment #2
sittard CreditAttribution: sittard commentedCheck the file size of your .htaccess and the permission in /sites/default/files/css
I had a strange file permission issue which meant the the file existed but it was empty. To recreate it you need to delete the file and save the configuration in the performance option.
Comment #3
netbjarne CreditAttribution: netbjarne commentedHi!
Thankyou both for feedback, and sorry for not replying until now, I must check my email notification settings ;)
URL: oldrup.dk
Contents of .htaccess in /sites/default/files/css looks alright to me, and deletes and creates just fine:
Please let me know if I can give further info to solve this puzzle. My YSlow and Google Pagespeed ranks are getting very good, CSS compression is the only thing lacking :)
Comment #4
netbjarne CreditAttribution: netbjarne commentedA few days ago, i updated the acquia slate theme to version 2.0, that didn't change anything. Next I will try with a testsite, using only a fresh install of drupal core and css gzip.
Oh, and another thing. I'm having the excact same problem with Javascript aggregator http://drupal.org/project/javascript_aggregator - the module creates the gz file, but it is not server - it does minify the javascripts, and that works.
Kind regards
Bjarne
Comment #5
KoCo CreditAttribution: KoCo commentedI use the acquia marina theme and have to use the hook exit option.
Comment #6
AgaPe CreditAttribution: AgaPe commentedHave the same with javascript and css modules.. Tried different settings on Performance page.
Comment #7
betancourt CreditAttribution: betancourt commentedI got the same issue on a shared server and the support team told me the gzip is turned on and off depending on the server load? why is this? any ideas or further clarification? Thanks
Comment #8
bflora CreditAttribution: bflora commentedAm having the same problem. Module is installed and creating gzipped css files and a new .htaccess in files/css, but the actual gzipped css is not being substituted for the compressed .css file so I'm still serving up the un-gzipped file to my visitors.
Is the htaccess file the one that's supposed to cause the substitution to happen?
My files/css folder is set to 777 btw.
Url for this site: http://windycitizen.com
Will happily pay for 30 minutes of the maintainer's time to troubleshoot this. Contact info is in my profile. Cheers!
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commented@bflora
your server is nginx & i get
Content-Encoding: gzip
when downloading a css file from your server. nginx is a lot more efficient in comparison to apache; doing gzip at the server level should be fine in your case. If you still want to use *.gz files then this should workhttp://wiki.nginx.org/HttpGzipStaticModule
Comment #10
bflora CreditAttribution: bflora commentedAnonymous visitors get nginx (which is fast). Logged in users get apache (which can be slow). So gzipping still has value.
Comment #11
mikeytown2 CreditAttribution: mikeytown2 commentedtry the alt where you place the htaccess rules inside your webroot .htaccess file (same level as index.php)
Directions are in the readme
http://drupalcode.org/viewvc/drupal/contributions/modules/css_gzip/READM...
Comment #12
bflora CreditAttribution: bflora commentedThe documentation is a bit confusing:
It says to "Add this Inside the block, right before (add it to the bottom)"
But then the code snippet actually includes and tags. So do I put that code inside of my existing set of and or do I take the code inside those and tags and put it inside my existing ones.
And what about the handful of lines above the and tags? Do I put those into the .htaccess file above my existing and tags in my Drupal htaccess?
I already have a Drupal htaccess with and tags and lots of rewrite rules. Unclear how to proceed based on the instructions in the readme.
Comment #13
bflora CreditAttribution: bflora commentedAlso, then after I make whatever changes need to be made. Do I need to restart apache? Clear my cache?
Comment #14
momper CreditAttribution: momper commentedsubscribe
Comment #15
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am having the exact same issue.
css.gz is being created in files/css but it is not being served
I am on apache2
clean urls
public download
css file permission 770
I used the regular setting and chose not to modify my .htaccess file.
I am having the same issue with javascript_aggregator also
Test 1: mod_deflate enabled
cleared all caches
results as above
Test 2: mod_deflate disabled
cleared all caches
results as above
I do have mod_deflate enabled and have to for another server that I have running
I would like to use css_gzip for the drupal related content
any help would be greatly appreciated.
Comment #16
armanschwarz CreditAttribution: armanschwarz commentedI am also experiencing this: CSS being GZipped but not served. My Javascript isn't being served as GZipped either though so this can't be CSS GZip's fault. Any ideas? I'm on a shared host, and not getting any errors...
Comment #17
kirtimansharma CreditAttribution: kirtimansharma commentedsubscribe
Comment #18
Rob C CreditAttribution: Rob C commentedsubscribe
Comment #19
suryav CreditAttribution: suryav commentedAny luck on this issue yet? I tried all possibilities (modifying root .htacees, disabling the auto-generated .htaccess, etc.) I am having the same exact issue - I see all the .css.gz and .js.gz files under /sites/default/files/css/ and /sites/default/files/js/ but viewsource still shows the .css and .js files served up.
This seems to be fixed in D7, can someone port the fixes for D6 and post a patch here?
Comment #20
wadmiraal CreditAttribution: wadmiraal commentedFor everyone: have you checked the Content-Encoding header you get with your CSS file ? As far as I know, the .htaccess rule rewrites the URL. So the URL in your HTML will be *.css, but Apache should serve the *css.gz file.
If you use Firefox, install Firebug and check the content encoding (see screenshot). In the screenshot, you'll see that the file extension is *.css, but the encoding is gzip. In our case, the module is working.
Hope this will help some of you.
Comment #21
DonnyCarette CreditAttribution: DonnyCarette commentedSame issues (Module does work on some hosts)
.HTACCESS and gzipt CSS files are generated but the headers are not send correctly which has as result that the site is displayed without CSS.
+++ UPDATE +++
Issue seems to be on LiteSpeed server.
On the performance configuration page set CSS Gzip and Gzip Javascript to not generate a .htaccess file
Place the following code inside your root .htaccess (Make sure that there aren't any .htaccess files inside the css en js folders anymore)
(Paste code inside )
Comment #22
eg208 CreditAttribution: eg208 commentedHi
#21 Work for me, thanks
Comment #23
mikeytown2 CreditAttribution: mikeytown2 commentedCSS Gzip will no longer be updated/supported. All future development is being done in the Advanced CSS/JS Aggregation module.