Mentioned in #1070938: Support hook_cdn_blacklist() and hook_cdn_blacklist_alter() to deal with same-origin policy more flexibly but making a separate issue for the sake of clarity:

At this link, why is e.g. /sites/all/themes/fusion/fusion_core/css/grid16-fluid.css or http://fonts.googleapis.com/css?family=Lobster|Reenie+Beanie|Tangerine not bundled within the advagg CSS?

Comments

mikeytown2’s picture

http://fonts.googleapis.com is an external css file.

depends on how /sites/all/themes/fusion/fusion_core/css/grid16-fluid.css was added; if it doesn't use drupal_add_css then I don't know about it. Does this file get bundled with advagg turned off?

vacilando’s picture

Category: bug » feature

1) I - probably foolishly - thought that maybe there was a possibility and advantage in bundling all CSS files, even the external ones, into one and serve that from a CDN. What do you think?

2) /sites/all/themes/fusion/fusion_core/css/grid16-fluid.css indeed does not use drupal_add_css because it apparently is not possible in the Fusion theme architecture under D6; see #712994: Aggregate local stylesheet using drupal_add_css.

mikeytown2’s picture

Title: Some CSS files not aggregated by advagg » Cache fonts.googleapis.com/css?* locally & add it to page via drupal_add_css.

ehh... http://fonts.googleapis.com/css?family=Lobster|Reenie+Beanie|Tangerine is not cached in your browser and it changes on every request. Thats pretty ugly.

It should be an issue with http://drupal.org/project/google_fonts or what ever library your using to load in those fonts. What module are you using? Switch the project on this issue over to that one.

mikeytown2’s picture

Project: Advanced CSS/JS Aggregation » Google Fonts

for performance reasons the fonts.googleapis.com/css?... links might want to be cached locally.

Look at the headers of this and you will see that the browser does not cache these at all
http://fonts.googleapis.com/css?family=Lobster|Reenie+Beanie|Tangerine. Also notice that the content changes per request (hit F5).

vacilando’s picture

Project: Google Fonts » @font-your-face
Version: 6.x-1.x-dev » 6.x-2.1
Category: feature » bug

It's actually http://drupal.org/project/fontyourface -- moving the issue there.

sreynen’s picture

Status: Active » Closed (works as designed)

I don't think it's a good idea to download the CSS with external font URL references, because those URLs might (and indeed, it appears they do) change. If you download the font files and also served those locally, this would make sense, but that doesn't seem like a great solution for most people, because Google has much faster servers than most people.

That said, if you really want to do this, you can do it outside the module by altering the external CSS with template_preprocess_page(). Or, you can download the font files and use #930066: Make it possible to include local installed fonts (local on the webserver) (after porting to D6) to serve them with local CSS. Or, you download the font files and use your theme to serve them locally.

So there are plenty of ways to accomplish your goals without modifying the module, and I believe your proposed changes to the module would, for most users, make it worse. Marking as "close (works as designed)" for now. Please re-open if you feel I've missed something important.