Feature #626

Link prototype and scriptaculous js files to Google's CDN

Added by Ryan Gordon over 2 years ago. Updated over 2 years ago.

Status:Rejected Start date:01/01/2010
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Javascript
Target version:-

Description

Using Google's JS API CDN, we can link to their prototype and scriptaculous js files. This gives the added benefit of a higher likelihood that the files will already be cached, and it will reduce the bandwidth footprint on MyBB sites as well as reduce the download package size and amount of JS files required to be distributed with MyBB

Associated revisions

Revision 4683
Added by Ryan Gordon over 2 years ago

Feature Link prototype and scriptaculous js files to Google's CDN (completes:626)
Fixes a few other misplaced images / bugs

Revision 4684
Added by Ryan Gordon over 2 years ago

Improves Link prototype and scriptaculous js files to Google's CDN (improves:626)

Revision 4710
Added by Ryan Gordon over 2 years ago

Reverting some changes from commit #4683 (fixes:626)

Revision 4731
Added by Huji Lee over 2 years ago

Feature Link prototype and scriptaculous js files to Google's CDN (completes:626)
Updating the files to a newer revision provided by Ryan Gordon

Revision 4732
Added by Justin S over 2 years ago

Feature Link prototype and scriptaculous js files to Google's CDN (completes:626)

Revision 4733
Added by Huji Lee over 2 years ago

Feature Link prototype and scriptaculous js files to Google's CDN (completes:626)
The prototype.js file provided by Ryan Gordon was a little different!

History

#1 Updated by Ryan Gordon over 2 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4683.

#2 Updated by Chris Boulton over 2 years ago

I'm thinking maybe this should be an option? If you've got MyBB on a local network, you may not have it open to the world as such, or even still - there might be policies/situations where you can't do this?

#3 Updated by Tom Moore over 2 years ago

Chris might be right... none of my local setups would connect to Google's CDN. I remember suggesting this a while ago, and your response was that you couldn't trust Google 100% to provide them. Has this changed?

#4 Updated by Ryan Gordon over 2 years ago

Chris Boulton wrote:

I'm thinking maybe this should be an option? If you've got MyBB on a local network, you may not have it open to the world as such, or even still - there might be policies/situations where you can't do this?

You're right, but in the long run all the projects are doing it, it seems like. It reduces the MyBB footprint in both size, number of files, and bandwidth. Plus google's servers are going to be much more uptime then anyone elses. In fact, I would bet money that they would never go down. Redundancy ftw.

In fact, the whole point of a forum software is to host it online as you will want to create a community for it. If this isn't the case, then you're either developing or testing which requires a working internet connection anyway. There are features like version checking and the MyBB Mods & Plugins pages within the ACP that all developers and all testers should have working access to. If not then they're not working in the environment they should be.

@Tom, then you're setup isn't configured correctly?

#5 Updated by Tom Moore over 2 years ago

No. Permissions from our network won't allow them and management won't allow those to be changed (incurs massive licencing costs @ £745 per computer, and at 200 PCs, that's not good). I'm sure others will also have some problems with switching to Google, such as those PCs which aren't connected to the internet.

I'm all for reducing the size, but another approach would be better. For example, provide the core with the scripts from Google but provide an option to turn them to local files. If the option is switched, it should check that they exist - if not, then point to them a wiki page that explains how to use that option.

#6 Updated by Ryan Gordon over 2 years ago

Tom Moore wrote:

No. Permissions from our network won't allow them and management won't allow those to be changed (incurs massive licencing costs @ £745 per computer, and at 200 PCs, that's not good). I'm sure others will also have some problems with switching to Google, such as those PCs which aren't connected to the internet.

You're kidding right? What kind of stupid network blocks... google?

P.S., in case you haven't noticed but no one is going to realistically run a bulletin board software that's not connected to the internet.

I'm all for reducing the size, but another approach would be better. For example, provide the core with the scripts from Google but provide an option to turn them to local files. If the option is switched, it should check that they exist - if not, then point to them a wiki page that explains how to use that option.

If you can't connect to google, then there's no way you can connect to the MyBB wiki.

#7 Updated by Chris R over 2 years ago

I think this should be an option.

As i have had google not load for me a number of times and other sites load. Also say you have a site in Australia Google CDN does not have a AU server i do not think so it could slow the site down.

#8 Updated by Ryan Gordon over 2 years ago

Chris R wrote:

I think this should be an option.

You're not qualified to suggest that. You don't know how it works, do you? First of all, after it's loaded the first time the browser cache's it, so it doesn't need it again. Second, if we add it as an option then we remove the WHOLE point of this feature: The point being remove the stupidly big prototype.js and scriptaculous.js, effects.js, dragdrog.js, and controls.js from the jscripts folder. In addition it also lowers the bandwidth on the site and since it's coming from google the chances that it's already cached are going to be a lot more likely since a lot other sites and software are now deploying it this way as well.

As i have had google not load for me a number of times and other sites load.

That would be your ISP's DNS. That is neither here nor there and it's definately isn't a problem with google or with MyBB.

Also say you have a site in Australia Google CDN does not have a AU server i do not think so it could slow the site down.

Anything coming from google is going to have a faster response then anything you've got. Besides we're talking milliseconds here, not seconds. Your concern is arbitrary to this discussion.

#9 Updated by Ryan Gordon over 2 years ago

Applied in changeset r4710.

#10 Updated by Ryan Gordon over 2 years ago

  • Status changed from Resolved to Rejected

#11 Updated by Ryan Gordon over 2 years ago

  • Assignee deleted (Ryan Gordon)
  • Target version deleted (1.6.0 Beta)

#12 Updated by Huji Lee over 2 years ago

Now that it is rejected, the files removed in r4683 onwards should be readded. This is what causes bug #694.

Also available in: Atom PDF