ADVANCED CSS/JS AGGREGATION MODULE

CONTENTS

CORE FEATURES & BENEFITS

SUBMODULE OVERVIEW

AdvAgg comes with quite a few submodules to do various tasks. Most are compatible with the vast majority of other mods but some may have conflicts. If so those are noted here and more details in the module's full write-ups.

AdvAgg Cdn (advagg_cdn)

This module may have conflicts, but only with other CDN type modules.

Load CSS or JavaScript libraries from a public CDN; currently only supports jQuery and jQuery UI with either Google's or Microsoft's CDN.

AdvAgg CSS/JS Validator (advagg_validator)

Validate CSS and or JS files in your site through a few different validators.

AdvAgg External Minifier (advaggextminify)

Minify CSS or JS through an otherwise unsupported method, with a configurable command line.

AdvAgg Minify CSS (advaggcssminify)

Minify the CSS files using a 3rd party minifier; currently supports YUI (included) or the Core minification algorithm.

AdvAgg Minify JS (advaggjsminify)

Compress the compiled JavaScript files using a 3rd party minifier; built in support for a number of minifiers.

AdvAgg Modifier (advagg_mod):

Depending on tweaks applied this module may cause compatibility issues with other modules.

Includes additional tweaks that may not work for all sites such as:

AdvAgg Old IE Compatibility Enhancer (advaggoldie_compatibility)

This module may have conflicts with other modules if it is enabled.

Includes additional functionality to improve Drupal compatibility with old versions of Internet Explorer (6-9).

CONFIGURATION

Settings page is located at: admin/config/development/performance/advagg.

Global Options

Compression Options

CSS Options

JS Options

CRON Options

Unless you have a good understanding of what you are trying to do, probably better to leave these alone. For best performance, setting up an external cron task is better than relying on Drupal's built in "poor man's cron".

Obscure Options

Information page

Located at admin/config/development/performance/advagg/info. This page provides debugging information. There are no configuration options here.

Operations page

Located at admin/config/development/performance/advagg/operations. This is a collection of commands to control the cache and manage testing of this module. In general this page is useful when troubleshooting some aggregation issues.

Drastic Measures

TIPS & TRICKS

JavaScript Bookmarklet

You can use this JS code as a bookmarklet for toggling the AdvAgg URL parameter. See http://en.wikipedia.org/wiki/Bookmarklet for more details.

javascript:(function(){
  var loc = document.location.href,
      qs = document.location.search,
      regex_off = /\&?advagg=-1/,
      goto = loc;
  if(qs.match(regex_off)) {
    goto = loc.replace(regex_off, '');
  } else {
    qs = qs ? qs + '&advagg=-1' : '?advagg=-1';
    goto = document.location.pathname + qs;
  }
  window.location = goto;
})();

HOW TO GET A HIGH PAGESPEED SCORE

Go to admin/config/development/performance/advagg

Ensure AdvAgg Modifier is enabled and go to admin/config/development/performance/advagg/mod

Ensure AdvAgg Minify JS is enabled and go to admin/config/development/performance/advagg/js-minify

ADVANCED AGGREGATES CDN

OVERVIEW

Note: This module may have conflicts, but only with other CDN type modules.

Load CSS or JavaScript libraries from a public CDN; currently only supports jQuery and jQuery UI with either Google's or Microsoft's CDN. Note the theme for the jQuery UI CSS that Drupal core uses is not available from either CDN. There is a similar one, smoothness, available which has only very minor differences.

CONFIGURATION

Located at admin/config/development/performance/advagg/cdn.

jQuery

jQuery UI

ADVANCED AGGREGATES CSS/JS VALIDATOR

OVERVIEW

Validate CSS and or JS files in your site through a few different validators.

CSSLint

Use the CSSLint JavaScript and the Drupal 8 core .csslintrc settings to lint the selected file(s) from your site.

W3.org CSS VALIDATOR

Warning: this has privacy implications. Specifically this sends your CSS to the W3 servers.

Use the W3.org CSS Validator to lint the selected file(s) from your site.

JSHint

Use the JSHint JavaScript to lint the files on your site.

ADVANCED AGGREGATES EXTERNAL MINIFIER

OVERVIEW

Warning: depending on permissions this presents a security risk due to using administrator configurable command line calls.

Note: May conflict with AdvAgg Minify CSS and or AdvAgg Minify JS depending on configuration. Don't use 2 minifiers on one asset type.

Minify CSS or JS through an otherwise unsupported method, with a configurable command line. This may not work on all servers depending on security settings.

CONFIGURATION

### CSS

ADVANCED AGGREGATES MINIFY CSS

OVERVIEW

Minify CSS files using a 3rd party minifier; currently supports YUI (included) or the Core cleaning algorithm. YUI will lead to much smaller files sizes and is the recommended option - basically, if you aren't using it, you probably will get better performance without this sub-module enabled. The YUI Compressor included with Advanced Aggregates is slightly different from that found on GitHub (as of last check, one patch had not been applied to the GitHub version).

CONFIGURATION

Located at admin/config/development/performance/advagg/css-minify

ADVANCED AGGREGATES MINIFY JAVASCRIPT

OVERVIEW

Minify JavaScript files using a 3rd party minifier. AdvAgg includes a few and supports one faster compiled PHP extension. The options are:

CONFIGURATION

Located at admin/config/development/performance/advagg/css-minify

JSMIN PHP EXTENSION

The AdvAgg Minify JavaScript module can take advantage of jsmin.c if it is available and selected as minifier. In that case, JavaScript parsing and minimizing will be done in C instead of PHP dramatically speeding up the process. The JsMin extension can be found at GitHub. There are instructions on installing and compiling it there. Note that if you are using PHP 7.x you'll need to use the feature/php7 branch rather than the master branch.

ADVANCED AGGREGATES MODIFIER

OVERVIEW

Depending on tweaks applied this module may cause compatibility issues with other modules.

Includes additional tweaks that may not work for all sites such as:

CONFIGURATION

Located at admin/config/development/performance/advagg/mod.

JS

CSS

ADVANCED AGGREGATES OLD IE COMPATIBILITY ENHANCER

OVERVIEW

This module may have conflicts with other modules if it is enabled.

Includes additional functionality to improve Drupal compatibility with old versions of Internet Explorer (6-9). No currently known compatibility issues however due to method required to override core on this it is easily possible that there are other modules that do conflict.

This module prevents CSS aggregates from being produced with more than 4095 (or a configured value) selectors as old Internet Explorer versions do not handle more than 4095 selectors in an individual file.

CONFIGURATION

Located at admin/config/development/performance/advagg/old_ie_compatibility.