Problem

I updated the AdvAgg module to 7.x-2.1. I now get three new warnings


1. Adv CSS CDN - jquery update  	Use jquery update instead of this sub module.
The jquery update module has support for CDNs. Go to the jquery update settings page and select a CDN instead of using this module.
2.Adv CSS/JS Agg - gzip  	Gzip is failing for css files.
The web servers configuration will need to be adjusted. In most cases make sure that the webroots .htaccess file still contains this section "Rules to correctly serve gzip compressed CSS and JS files".
3.Adv JS CDN - jquery update	       Use jquery update instead of this sub module.
The jquery update module has support for CDNs. Go to the jquery update settings page and select a CDN instead of using this module.

1. It no longer recognizes I'm using Google CDN for jQuery. Clearing the cache and switching the CDN to none and back has no effect. However I'm definitely still downloading the Google API jQuery library. This error is doubled.
2. It says gzip is failing for CSS, however YSlow doesn't list any of my CSS files as being un-gzipped.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

splitsplitsplit’s picture

Issue summary: View changes
splitsplitsplit’s picture

Issue summary: View changes
splitsplitsplit’s picture

Issue summary: View changes
splitsplitsplit’s picture

Issue summary: View changes
splitsplitsplit’s picture

Issue summary: View changes

It seems to have made a comment every time i edited.

mikeytown2’s picture

Adv CSS CDN - jquery update  Use jquery update instead of this sub module.
The jquery update module has support for CDNs. Go to the jquery update settings page and select a CDN instead of using this module.

Adv JS CDN - jquery update        Use jquery update instead of this sub module.
The jquery update module has support for CDNs. Go to the jquery update settings page and select a CDN instead of using this module.

This is saying that the Adv CSS CDN & Adv JS CDN modules are not needed and should be disabled; they are duplicating the functionality found inside of the jquery update module.

Adv CSS/JS Agg - gzip  	Gzip is failing for css files.
The web servers configuration will need to be adjusted. In most cases make sure that the webroots .htaccess file still contains this section "Rules to correctly serve gzip compressed CSS and JS files".

Code for this is check is located here: http://drupalcode.org/project/advagg.git/blob/4b2d913b7fcad9555c9fe8e1b0...

I'll create a patch that will give better diagnostic output when this warning shows up.

mikeytown2’s picture

Status: Active » Needs review
FileSize
3.51 KB

Following patch has been committed. If you could apply it (or get the latest dev) and let me know what the gzip warning says that would be helpful.

mikeytown2’s picture

Category: Bug report » Support request
splitsplitsplit’s picture

Sorry this has taken so long, I've been having some nginx issues and I had to try and recreate my dev environment.

The warnings are now all updated and useful. I'm getting the following warning in the gzip section.

stdClass Object
(
    [request] => GET /sites/default/files/advagg_css/css__ID3ivBrID6pZQ1vSRjpQ41oTIzvOWQGcGRTG_Doz8CQ__a45-y5M6urySp59zN4LuSPy2L9tpvAiWOAbbHxeUXAw__smMK2QSt2dYiHjUPvNlMbz9kHT6L1VvTMhhdoElL4UM.css HTTP/1.0
Accept-Encoding: gzip, deflate
User-Agent: Drupal (+http://drupal.org/)
Host: eslsearch.net


    [data] => ...
    [protocol] => HTTP/1.1
    [status_message] => OK
    [headers] => Array
        (
            [server] => nginx/1.1.19
            [date] => Wed, 13 Nov 2013 19:42:58 GMT
            [content-type] => text/css
            [content-length] => 7523
            [connection] => close
            [vary] => Accept-Encoding
            [expires] => Thu, 31 Dec 2037 23:55:55 GMT
            [cache-control] => max-age=290304000, no-transform, public
            [last-modified] => Wed, 20 Jan 1988 04:20:42 GMT
            [accept-ranges] => bytes
        )

    [code] => 200
)

Other possibly useful bits of information:

I'm running Ubuntu Server 12.04, on a LEMP stack with the default nginx configuration. The relevant lines in my /etc/nginx/sites-available/mysite are below.

I'm new to nginx configuration so it's possible that I've mis-configured it (still learning) however with the chunk below removed or present I still get the gzip error.

server {
      ...
      ...
           location ~* files/advagg_(?:css|js)/ {
                access_log off;
                expires    max;
                add_header ETag "";
                add_header Cache-Control "max-age=290304000, no-transform, public";
                add_header Last-Modified "Wed, 20 Jan 1988 04:20:42 GMT";
                try_files  $uri @drupal;
            }
}
mikeytown2’s picture

add gzip_static on; to the top of the location ~* files/advagg_(?:css|js)/ { rule block.

mikeytown2’s picture

Status: Needs review » Fixed
FileSize
694 bytes

Following patch has been committed

splitsplitsplit’s picture

Unfortunately that has no effect. However turning off Secure pages removes the error. I have the same advagg config below in my secure nginx config. Does HTTPS need a different configuration?

server {
          listen 443 ssl;
            ...
            ssl on;
            ssl_certificate      /etc/nginx/ssl/mycert.crt;
            ssl_certificate_key  /etc/nginx/ssl/server.key;
            ...
            ...
            location ~* files/advagg_(?:css|js)/ {
                gzip_static on;
                access_log off;
                expires    max;
                add_header ETag "";
                add_header Cache-Control "max-age=290304000, no-transform, public";
                try_files  $uri @drupal;
            }
}

Possibly relevant, I already have gzip enabled in my standard nginx conf: /etc/nginx/nginx.conf

...

http {

       ...
       ...

        gzip on;
        gzip_min_length  1100;
        gzip_buffers  16 8k;
        gzip_vary on;
        gzip_disable "msie6";
         gzip_proxied any;
         gzip_comp_level 6;
         gzip_http_version 1.1;
         gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

}

Also when I run YSlow on my page I'm not getting any complaints that anything isn't gzipped. I still have my A rating.

mikeytown2’s picture

If YSlow is giving you an A rating then you're probably good.

Why doing header detection like this isn't 100%:
Requesting your self isn't 100% reliable. Requests will usually take the shortest route to the web server and when you're requesting your self sometimes part of the web stack gets bypassed. I thought about using the Coral Cache as a "proxy" so that requests to your self would go out to the internet and back in so you could get a better gauge on what will actually be seen by a web browser. But requesting things like https://drupal.org.nyud.net/ doesn't work (https) and http://drupal.org.nyud.net/ doesn't show gzip encoding even though http://drupal.org/ is gzip encoded. I haven't come up with a good solution to this problem as it requires a from of an Open Proxy that doesn't modify the headers sent back in order to be 100% effective.

mikeytown2’s picture

Title: New warnings post update - jQuery CDN and gzip » Better Status Report Output: New warnings post update - jQuery CDN and gzip

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Liam McDermott’s picture

Version: 7.x-2.1 » 7.x-2.5
Status: Closed (fixed) » Active

I had the Gzip is failing for css files. (and for Javascript too) warning messages with nginx, despite my browser showing CSS/JS files were being gzipped. Turned out the problem was nginx was configured to only gzip http 1.1 requests:

gzip_http_version 1.1;

Changing this to:

gzip_http_version 1.0;

Removed the warnings in my case. I'm marking this issue active again, in case this quirk should be documented somewhere, even if not I thought I'd document this here in the hopes someone else finds it useful!

Apparently configuring nginx to only gzip http 1.1 requests is not just a bad idea for Adv Aggregation, it's also not a good idea if you're using CloudFront CDN.

  • Commit a0b606e on 7.x-2.x by mikeytown2:
    Issue #2132777 by mikeytown2: test http 1.0 & 1.1; warn about nginx gzip...
mikeytown2’s picture

Status: Active » Fixed
FileSize
28.42 KB

If httprl is enabled and drupal version >= 7.22 AdvAgg will now test http 1.0 & 1.1. Also mentions nginx and points to that article.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.