I understand that 3.1 will ship with jQuery. This is great!
Can you also add the option for admin who can decide to use Google's libraries instead (via AJAX libraries API http://code.google.com/apis/libraries/)? There are at least 2 benefits:
1) Many large sites use Google's libraries so there's a very high probability that these are already cached on the user's computer.
2) Even if the libraries aren't already cached, it could speed things up as
a) The libraries are coming from a different domain, so for browsers that limit parallel threads from 1 domain this can help,
b ) Google has a very massive CDN and serving anything through that implicitly speeds things up
If I understand corectly, Google has following libraries available:
Dojo
Ext Core
jQuery
jQuery UI
MooTools
Prototype
script.aculo.us
SWFObject
WebFont Loader
Ticket: http://tracker.phpbb.com/browse/PHPBB3-10390
[RFC|Merged] Use Google's jQuery
- sooskriszta
- Registered User
- Posts: 85
- Joined: Wed Dec 29, 2010 7:23 pm
[RFC|Merged] Use Google's jQuery
OC2PS
Testfestés, Arcfestés, Csillámfestés
Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta
Testfestés, Arcfestés, Csillámfestés
Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: Use Google's jQuery
While I kind of like the idea, I don't think it will ever be accepted. There are two reasons for this: firstly, if the google CDN goes down then tonnes of boards go down - this is not true, as it is really easy to write a fallback (see html5bp and how it does it). Secondly is security - phpBB does not allow remote scripts in case the third party server is hacked and malicious code sent. This being google CDN, I can't see that happening.
- bantu
- 3.0 Release Manager
- Posts: 557
- Joined: Thu Sep 07, 2006 11:22 am
- Location: Karlsruhe, Germany
- Contact:
Re: Use Google's jQuery
There are quite a few reasons why phpBB should not use a CDN by default.
However, we should make it pretty easy to use a service like a CDN.
- Private networks: phpBB has to function properly without an internet connection.
- Privacy: A request to a phpBB board sends a request to the CDN.
However, we should make it pretty easy to use a service like a CDN.
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: Use Google's jQuery
I hadn't considered the privacy argument, but the connection argument is invalid - a one line fallback is all that is required.bantu wrote:There are quite a few reasons why phpBB should not use a CDN by default.Considering this, JavaScript libraries have to be shipped with phpBB and have to be delivered from the webserver where phpBB is running on by default.
- Private networks: phpBB has to function properly without an internet connection.
- Privacy: A request to a phpBB board sends a request to the CDN.
However, we should make it pretty easy to use a service like a CDN.
- sooskriszta
- Registered User
- Posts: 85
- Joined: Wed Dec 29, 2010 7:23 pm
Re: Use Google's jQuery
I agree - by default phpbb should use the libraries it ships with. However, I would submit that it is very beneficial to many boards to have an option to check a box in ACP that makes phpbb use Google libraries instead.bantu wrote:phpBB should not use a CDN by default.
OC2PS
Testfestés, Arcfestés, Csillámfestés
Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta
Testfestés, Arcfestés, Csillámfestés
Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: Use Google's jQuery
+1 (and a text input to allow the user to specify a remote library, although it should default to google)sooskriszta wrote:I agree - by default phpbb should use the libraries it ships with. However, I would submit that it is very beneficial to many boards to have an option to check a box in ACP that makes phpbb use Google libraries instead.
- nickvergessen
- Former Team Member
- Posts: 733
- Joined: Sun Oct 07, 2007 11:54 am
- Location: Stuttgart, Germany
- Contact:
Re: Use Google's jQuery
This could be an easy MOD
Member of the Development-Team — No Support via PM
Re: Use Google's jQuery
nickvergessen wrote:This could be an easy MOD
Didn't I already present this many months ago?naderman wrote:I agree that we should provide this option by default.
viewtopic.php?f=108&t=33747&start=50#p224199
Has an irascible disposition.
Re: Use Google's jQuery
Yup and I still agree with you. Maybe you want to write a patch for this?VSE+ wrote:nickvergessen wrote:This could be an easy MODDidn't I already present this many months ago?naderman wrote:I agree that we should provide this option by default.
viewtopic.php?f=108&t=33747&start=50#p224199