Several interrelated questions and suggestions for your consideration:
1) I have been using morule "jQuery Update" 6.x-2.0-alpha1. Now that you got jQuery loading via Google libraries (http://code.google.com/apis/libraries/devguide.html#jquery) I guess this is ineffective or even not working. Shouldn't we turn off jQuery Update when using advagg? Maybe you can put a message to the status screen that jQuery Update is superfluous and should be turned off?
2) Could you provide a choice of different jQuery versions in a settings screen for advagg? All of them are on Google. Just a question of a select box or something.
3) jQuery UI is another library much needed by many Drupal module, and it is also at Google. Could you add it. And then maybe you can put a message to the status screen that jQuery UI can be served via advagg more efficiently but that the standalone module jQuery UI should be turned off.
4) What about support for other libraries that are at Google. Maybe advagg could detect that the site has enabled this or that library locally, but it is also at Google, from where it could be served more efficiently. This is a generic case of (3).
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | advagg-js-cdn-1071624-11.patch | 1.72 KB | mikeytown2 |
| #6 | advagg-1071624.patch | 2.92 KB | mikeytown2 |
| #3 | advagg_with_jQuery_Update.JPG | 12.51 KB | vacilando |
| #3 | advagg_without_jQuery_Update.JPG | 9.99 KB | vacilando |
Comments
Comment #1
vacilando commentedFurther to (1) -- I, for one, cannot actually turn off need jQuery Update as it is required by Skinr UI 6.x-2.x-dev, so it would be highly desirable to be able to have a choice of jQuery versions (2).
Comment #2
vacilando commentedI've noticed that in fact advagg pulls http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js which is the same version as what jQuery Update 6.x-2.0-alpha1 offers. But the problem is that e.g. Skinr UI has jQuery Update as a dependency, so I cannot switch it off. There might be other such cases.
Comment #3
vacilando commentedMore findings: after switching off jQuery Update, thinking that I do not need it having http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js provided by advagg, I ran into all sorts of troubles with the website.
Eventually found that the status page has NO information about jQuery - see snapshot #1. Further, I found that the library loaded by advagg is now http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js ! (Why did it not say: jQuery 1.2.6 on the status page is a mystery!)
Switching on jQuery Update again I saw jQuery 1.3.2 in the status page, http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js in the source from advagg and the site started to behave again.
So it seems that advagg takes jQuery Update as kind of switch, but uses the library from Google. Wish this had been documented, even if in a cursory way.. lost a lot of time.
Anyway, my other questions are still valid.
Comment #4
mikeytown2 commentedLooks like you figured out that I use jQuery update as an indicator as to what jQuery version to use. This module is still changing heavily; writing detailed documentation at this point will slow down development... once the pace slows down expect this module to be better documented.
In terms of jQuery UI google only hosts the big jquery file
http://code.google.com/apis/libraries/devguide.html#jqueryUI
Anyway it's on my todo list. Keep the stand alone module turned on.
I will add in support for google CDN replacement one request at a time. Patches accepted.
As for the status page; my guess is jQuery Update looks for their file. I'll have to dig into the module code.
Comment #5
mikeytown2 commentedLooking at jQuery update and it's status shows up on my status page. Long story short, advagg has ZERO impact on the jQuery Update status code.
Code in question:
Now for the jQuery UI google CDN...
Comment #6
mikeytown2 commentedjQuery UI now goes to googles CDN.
Note google only hosts the main file (jquery-ui.js), it does not host the sub files.
This patch has been committed.
Comment #7
vacilando commentedCongrats on the jQuery UI inclusion!
Some remaining questions from this thread I'd like to see your opinion about:
1. Even if advagg does have nothing to do with jQuery Update and jQuery UI modules, it would be really good to somehow show that advagg recognizes them and delivers what normally they deliver but from a highly available location at Google. I believe this will one day be listed on the project page and in the README.txt. Still, it would be lovely if the fact could also be indicated on the status page, or on the (planned) GUI. People like me like to verify whether things work as designed, so after activating advagg I would like to see a confirmation that indeed it took care for replacing the local libraries.
2. Any advantage in the idea of providing a select box offering various different jQuery and jQuery UI versions for people to select? Those who don't mind experimenting could bring up the library version as long as they don't see adverse effects.
3. Any other libraries that could be detected like this and fetched from Google or another highly available CDN?
Comment #9
webfunkin commentedI have patched my jQuery update module to render jquery 1.4.2. Will it be possible to get that version from google's cdn?
Comment #10
mikeytown2 commentedit could be possible. create a "hidden" setting; one that you set in your settings.php file
Comment #11
mikeytown2 commentedif using the jQuery Update module the the variable to set in settings.php is
If not using jQuery Update
This patch has been committed.
Comment #12
webfunkin commentedWorks. Thanks!
Comment #13
vacilando commentedNice, but just to be absolutely clear -- if I use unpatched jQuery Update module I am fine, advagg knows what to get from Google CDN, right? The settings.php variables are just overrides of that, yes?
Comment #14
webfunkin commentedyeah, that's right.