The culprits were K2, JomSocial, Virtuemart2 and an Atristeer template.
I could easily envisage adding a couple of fancy modules that also load
their own versions. I wonder what the record is? I'm sure its >1GB of
jQuery scripts on one webpage.
THIS IS GETTING BEYOND A JOKE.
From what I can see the obvious solution is for 3rd party developers
who insist on using jQuery to use a common version loaded by a system
plugin or installable library. Developing such a plugin is not the
responsibility of the core Joomla developers - in fact there appear to
be several candidates already available
http://extensions.joomla.org/extensions/core-enhancements/scripts
This sort of abuse of bandwidth (and hence ultimately the environment)
is not appropriate and should some to an end.
So please, developers who use jQuery, get your act together and agree a
common approach to solving this ridiculous state of affairs.
Geraint
Lets please get people back to using a sane JS framework. kthxbye
Hannes
Geraint
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
Geraint,
Isn't there some sort of�programmatic�way to check to see if jQuery is already loaded, and if it isn't load it? If that is the case, I think that technique needs to be publicized among developers to help the�situation.�Maybe we need a core plugin to do that?
Best,
Matt ThomasFounder�betweenbrain�Lead Developer�Construct Template Development FrameworkPhone: 203.632.9322
Twitter: @betweenbrain
Github:�https://github.com/betweenbrain
On Thu, Jan 5, 2012 at 8:52 AM, Geraint Edwards <joomla_...@copyn.plus.com> wrote:
I loaded a typical Joomla webpage today and discovered that it was loading 4 DIFFERENT versions of jQuery - these were thankfully compressed by mod_deflate but it still added up to 280KB (uncompressed > 800KB of javascript for ONE PAGE)!!
The culprits were K2, JomSocial, Virtuemart2 and an Atristeer template. �I could easily envisage adding a couple of fancy modules that also load their own versions. �I wonder what the record is? I'm sure its >1GB of jQuery scripts on one webpage.
THIS IS GETTING BEYOND A JOKE.
>From what I can see the obvious solution is for 3rd party developers who insist on using jQuery to use a common version loaded by a system plugin or installable library. �Developing such a plugin is not the responsibility of the core Joomla developers - in fact there appear to be several candidates already available http://extensions.joomla.org/extensions/core-enhancements/scripts
This sort of abuse of bandwidth (and hence ultimately the environment) is not appropriate and should some to an end.
So please, developers who use jQuery, get your act together and agree a common approach to solving this ridiculous state of affairs.
Geraint
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
I guess one problem to address would be that an old system plugin may
load jQuery 1.5 when another needs jQuery 1.7.
What I'm not sure about is how to get the developers that are causing
this problem to start talking to each other about the best solution.
There was a discussion over 1 year ago at
joomla-de...@googlegroups.com started by Joe leBlanc (he refers to
a closed discussion group here
http://people.joomla.org/groups/viewdiscussion/783-Best+practices+for+extension+developers+using+jQuery.html?groupid=445
- I can't access it so no idea what was discussed).
Geraint
Regards
Andrew Eddie
I would vote against a jquery specific solution in favour of a system that takes a name, a version and a path and at rendering time only provides the path for <name> with the highest version number. That would mean that you could use it for jquery, mootools, dojo and also for plugins for those frameworks. Intuitively I would make it a method of JDocumentHTML.
Hannes
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/LYIjmi_T_8kJ.
Cheers,
Sam Moffatt
http://pasamio.id.au
I'm not saying to ship/provide jquery or whatever with the core with this feature, but to simply use it for injecting the include in the head and to prevent more than one jquery to be included. That would potentially reduce the code necessary in the behavior jhtml classes...
The extensions would still provide their own jquery, but Joomla would prevent them from being loaded except for the latest version provided by the extensions.
Hannes
Every extension that needs jquery provides its version and registers it with JDocumentHTML::addJSClass(). If then more than one extension registers a framework/class/plugin, Joomla compares the versions and only includes the latest version. So you register in your component or module and upon rendering the actual script tag in the head is generated.
To be honest I'm much more inclined to think providing a standard
JHTML::_('behaviour.jquery') is the best option and particular
versions are for a particular set of releases (e.g. one for 2.5, 3.0,
etc). Then at least you can check the version in Joomla! before you
load things and know that if you ask for jQuery you are assured of
getting a given version for a given release. Not too dissimilar to how
MooTools works.
Cheers,
Sam Moffatt
http://pasamio.id.au
On Fri, Jan 6, 2012 at 5:10 PM, Hannes Papenberg
JHTML::_('behaviour.jquery')
since it provides developers with some certainty that the version they
anticipated will be the one they get. I have no idea if 6 monthly
updates would be enough, we really need the jQuery users to comment on
this and, I would argue, to step up to the plate to maintain a suitable
version.
Geraint
It's relatively easy to write a system plug-in that it ether provides something like JHTML::_('jquery.framework') or - my personal preference - an override for JHtmlBehavior that not only provides jQuery but also overrides some of the other behaviors with jQuery code (keepalive and noframes should be relativly easy) to lessen the chance of people having to load both jQuery and MooTools.
Rouven
Ofer Cohen
Yes, my proposal creates issues when newer versions of a JS library are
incompatible with older versions, but I see that as a problem of the
library, not from us. I'm actually wondering what is happening in case
you load two different versions of jQuery... Do they co-exist or does
one cancel out the other? Reading this it seems as if different versions
overwrite each other ... in a way:
http://forum.jquery.com/topic/multiple-versions-of-jquery-on-the-same-page
That would mean that a site that loads more than one jquery might as
well only load the latest and be done with it. The rest is just dead
weight that is not executed... (Have to admit, didn't test this...)
In any case, if this is true, the solution proposed by me would be
sufficient and would not require including another JS library (e.g.
jQuery) in our distribution.
Hannes
We just need a volunteer :'( .
Given the high profile projects that now use jQuery (K2, JomSocial,
Virtuemart, Community Builder to name but a few) they should be able to
muster the resources to maintain and test this as either part of the
core or as a standalone plugin.
Geraint
It has the (HUGE) advantage that dev's would know the jquery version,
could download it easily, AND for users that browse more than one
Joomla! site, it would only have to be downloaded once.
For what it's worth... I think Mootools should be loaded the same way.
Has anyone given any thought to at least making this an option in the
admin panels? I haven't looked at it lately, but I have seen several
code samples for pulling Javascript from the cloud and falling back to
pulling it from your own site if the cloud is down for any reason
(unlikely, but possible).
It shouldn't be that tough to provide an option when setting up a site
to either rely totally on pulling the Javascript framework from the
cloud, or downloading the JS library installing it into the Joomla!
libraries, and then the site would try loading it from the cloud first
and fallback to the site, or just load the JS from the site every time.
Obviously, the default for the first version including this would be the
behaviour we have now (loading from the site), and we'd have to include
methods to be able to change your mind later, but it's all fairly doable
:).
Brad
I so absolutely don't want to make every Joomla installation pull its javascript from Google. If you do that, you might as well add a phone home feature that is enabled by default.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google
Groups
"Joomla! CMS Development" group.
To post to this group, send an email to
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google
Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups
"Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups
"Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups
"Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
+1 for configurable when default is local.
Ofer Cohen
If anything, loading jQuery from Google should be configurable. In my opinion, it should default to a local copy as many times sites need to wait for it to load. I've also found it better for development purposes to load a local than from Google.
Just my 2 cents.
Best,
Matt ThomasFounder�betweenbrain�Lead Developer�Construct Template Development FrameworkPhone: 203.632.9322
Twitter: @betweenbrain
Github:�https://github.com/betweenbrain
<hack...@googlemail.com> �wrote:
Every extension that needs jquery provides its version and registers it with
JDocumentHTML::addJSClass(). If then more than one extension registers a
framework/class/plugin, Joomla compares the versions and only includes the
latest version. So you register in your component or module and upon
rendering the actual script tag in the head is generated.
Am 07.01.2012 01:30 schrieb "Jennifer Marriott"<marpomu...@gmail.com>:
How would that stop multiple versions Hannes? �Maybe I am
misunderstanding?
On Fri, Jan 6, 2012 at 6:28 PM, Hannes Papenberg
<hack...@googlemail.com> �wrote:
I'm not saying to ship/provide jquery or whatever with the core with this
feature, but to simply use it for injecting the include in the head and to
prevent more than one jquery to be included. That would potentially reduce
the code necessary in the behavior jhtml classes...
The extensions would still provide their own jquery, but Joomla would
prevent them from being loaded except for the latest version provided by the
extensions.
Hannes
Am 07.01.2012 01:18 schrieb "Sam Moffatt"<pas...@gmail.com>:
If the core were to distribute jQuery, it should be a singular version
just as MooTools has been for the most part a singular version.
Otherwise we end up in a potential battle where people potentially run
into backwards compatibility issues. Doing JavaScript dependency
management is something that is non-trivial and would potentially lead
to conflicts due to something asking for a version and not getting it
at which point we've gone no where.
Cheers,
Sam Moffatt
http://pasamio.id.au
On Fri, Jan 6, 2012 at 3:40 PM, Hannes Papenberg
<hack...@googlemail.com> �wrote:
I would vote against a jquery specific solution in favour of a system
that
takes a name, a version and a path and at rendering time only provides
the
path for<name> �with the highest version number. That would mean that
you
could use it for jquery, mootools, dojo and also for plugins for those
frameworks. Intuitively I would make it a method of JDocumentHTML.
Hannes
Am 06.01.2012 23:54 schrieb "James Durrant"<ja...@bigbang.ie>:
Optional use of a Content Delivery Network (CDN) should also be
considered.
These examples are from the HTML5 boilerplate. They include a
fallback for
offline development.
https://github.com/h5bp/html5-boilerplate/blob/master/index.html (lines 48
and 49).
JQuery
� � <script
src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
� � <script>window.jQuery || document.write('<script
src="/media/system/js/jquery-1.5.1.min.js">\x3C/script>')</script>
MooTools
� � <script src="
//ajax.googleapis.com/ajax/libs/mootools/1.4.1/mootools-yui-compressed.js"></script>
� � <script>window.MooTools || document.write('<script
src="/media/system/js/jquery-1.4.1.min.js">\x3C/script>')</script>
--
You received this message because you are subscribed to the Google
Groups
"Joomla! CMS Development" group.
To view this discussion on the web, visit
https://groups.google.com/d/msg/joomla-dev-cms/-/LYIjmi_T_8kJ.
To post to this group, send an email to
Steven Sheeley Web Developer, Myndworx Asylum
steve....@gmail.com | www.myndworx.com | www.paranomicon.org
+1 for configurable when default is local.
Ofer Cohen
On 01/07/2012 08:21 PM, Matt Thomas wrote:
If anything, loading jQuery from Google should be configurable. In my opinion, it should default to a local copy as many times sites need to wait for it to load. I've also found it better for development purposes to load a local than from Google.
Just my 2 cents.
Best,
Matt ThomasFounder betweenbrain™Lead Developer Construct Template Development FrameworkPhone: 203.632.9322
Twitter: @betweenbrain
Github: https://github.com/betweenbrain
<hack...@googlemail.com> wrote:
Every extension that needs jquery provides its version and registers it with
JDocumentHTML::addJSClass(). If then more than one extension registers a
framework/class/plugin, Joomla compares the versions and only includes the
latest version. So you register in your component or module and upon
rendering the actual script tag in the head is generated.
Am 07.01.2012 01:30 schrieb "Jennifer Marriott"<marpomu...@gmail.com>:
How would that stop multiple versions Hannes? Maybe I am
misunderstanding?
On Fri, Jan 6, 2012 at 6:28 PM, Hannes Papenberg
<hack...@googlemail.com> wrote:
I'm not saying to ship/provide jquery or whatever with the core with this
feature, but to simply use it for injecting the include in the head and to
prevent more than one jquery to be included. That would potentially reduce
the code necessary in the behavior jhtml classes...
The extensions would still provide their own jquery, but Joomla would
prevent them from being loaded except for the latest version provided by the
extensions.
Hannes
Am 07.01.2012 01:18 schrieb "Sam Moffatt"<pas...@gmail.com>:
If the core were to distribute jQuery, it should be a singular version
just as MooTools has been for the most part a singular version.
Otherwise we end up in a potential battle where people potentially run
into backwards compatibility issues. Doing JavaScript dependency
management is something that is non-trivial and would potentially lead
to conflicts due to something asking for a version and not getting it
at which point we've gone no where.
Cheers,
Sam Moffatt
http://pasamio.id.au
On Fri, Jan 6, 2012 at 3:40 PM, Hannes Papenberg
<hack...@googlemail.com> wrote:
I would vote against a jquery specific solution in favour of a system
that
takes a name, a version and a path and at rendering time only provides
the
path for<name> with the highest version number. That would mean that
you
could use it for jquery, mootools, dojo and also for plugins for those
frameworks. Intuitively I would make it a method of JDocumentHTML.
Hannes
Am 06.01.2012 23:54 schrieb "James Durrant"<ja...@bigbang.ie>:
Optional use of a Content Delivery Network (CDN) should also be
considered.
These examples are from the HTML5 boilerplate. They include a
fallback for
offline development.
https://github.com/h5bp/html5-boilerplate/blob/master/index.html (lines 48
and 49).
JQuery
<script
src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
<script>window.jQuery || document.write('<script
src="/media/system/js/jquery-1.5.1.min.js">\x3C/script>')</script>
MooTools
<script src="
//ajax.googleapis.com/ajax/libs/mootools/1.4.1/mootools-yui-compressed.js"></script>
When you load your jquery for your site from Google, Google knows about every user that visits your site, about every installation of Joomla that you have and also which sites your users visited. This is close to the equivalent of putting everyone under 100% surveillance by Google. Yes, I use Google services, but I absolutely never ever trust them.
Simple example: you run a whistleblower website based on Joomla. The government goes to Google and forces them to hand over the logs who accessed the site and they can prosecute whistleblowers or even people just reading the site. And don't tell me that didn't/doesn't happen. Simply naming China, Iran or Burma should be enough.
The cloud is most likely the stupidest idea ever in terms of privacy.
Rouven
Also a big no from me for loading Mootools or anything else from Google. Such a solution can be provided by a 3rd party plug-in. We really need to stop trying to cram everything into the core.
Rouven
> @rouven - There's a difference between craming everything in the core and making the core extendible - I can't see how adding the ability to use your own source for a static asset would add more than 2 or 3 lines of code to the current platform or any variation of it; especially when there are so many other features that are heavier and less useful .
A general solution for CDN support is something different than allowing some files to be loaded from Google. Using the Google "CDN" only involves having a relatively simple plug-in which I'm sure is available somewhere already.
> Static assets could be loaded from any CDN (cdn.mydomain.com) allowing parallel downloading. Personally I'd use Google (although I'll need to look further into @beats comments) because the library is likely pre-cached by the user's browser.
I started writing some code that will eventually allow people to host the entire media folder on a different domain (for parallel loading and cookie benefits) or even a CDN. Unfortunately there's some disagreement over the API but maybe we'll get lucky for 3.0. ;)
Rouven
I did a talk on JavaScript frameworks at Joomla Day UK 2011 and came
to exactly this conclusion. Sides here if anyone is interested
(suggestions on last slide):
http://www.softforge.co.uk/resource-area/downloads/softforge/doc_download/13-javascript-frameworks
Beat, if you were to contribute this functionality for v3.0 I think it
would be a great service to Joomla and I would happily test it.
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-cms/-/UUjoW1Hkr00J.
As Elin says
"If a few major developers would just each put up funding for 2 hours
of developer time and have a two hour meeting to come to an agreement on
how to solve in a common way most likely the whole issue would be solved
and everyone else would just follow along."
What does it take to make this happen? It sounds as though CB is on
board with the concept :-) , now we just need the others ''major
developers' K2, Virtuemart, JomSocial etc. to get on board
Geraint
I loaded a typical Joomla webpage today and discovered that it was loading 4 DIFFERENT versions of jQuery - these were thankfully compressed by mod_deflate but it still added up to 280KB (uncompressed > 800KB of javascript for ONE PAGE)!!
The culprits were K2, JomSocial, Virtuemart2 and an Atristeer template. I could easily envisage adding a couple of fancy modules that also load their own versions. I wonder what the record is? I'm sure its >1GB of jQuery scripts on one webpage.
THIS IS GETTING BEYOND A JOKE.
From what I can see the obvious solution is for 3rd party developers who insist on using jQuery to use a common version loaded by a system plugin or installable library. Developing such a plugin is not the responsibility of the core Joomla developers - in fact there appear to be several candidates already available http://extensions.joomla.org/extensions/core-enhancements/scripts
This sort of abuse of bandwidth (and hence ultimately the environment) is not appropriate and should some to an end.
So please, developers who use jQuery, get your act together and agree a common approach to solving this ridiculous state of affairs.
Geraint
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-dev-cms@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cms+unsubscribe@googlegroups.com.
> The core of Joomla should have an update alert to avoid this problem.
Check out the beta for 2.5, update notifications have been added there. (Big thanks to Nic again here)
> I checked the same situation and I noticed that there is no filter to update the extensions quickly.
> If the core block of Joomla extensions with old parts, could be a way to force developers to upgrade the components, modules and plugins.
> This already happens in other CMS.
>
How are other CMSs forcing extension devs to update their extensions. Not sure I understand what you're saying.
Rouven
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
Rouven