Providing the JS files from Github or Google
I really really don't think that the JS files should be served from the blog's servers. (WP is not updated when Scriptaculous or jQuery is updated, thus the JS files remain OLD.) It would be much easier AND faster to provide the JS files from Github or Google.
People who need jQuery or others already use wp_deregister_script and wp_register_script to change the JS files to the CDNs. Why not change the core and make the JS files served from the CDNs? (People who really want to serve the files from their own servers could also use wp_deregister_script and wp_register_script.)
Think about it:
1. The absence of the JS files in wp-includes would lower the size of the WordPress package. (Scriptaculous and jQuery alone bloats the WP package with 400KB!)
2. The JS files would be downloaded to the visitors' computers MUCH FASTER because of being in other servers than ours (serving files from different servers allows the browser of the visitor to download files simultaneously).
3. Github or Google update the JS files rapidly so our blogs would serve the latest version of jQuery or Scriptaculous!
the problem with this is that maybe a newer version of jquery would break someone's code, crippling their site. allowing people to have complete control over their site is important. if you want to use google's jquery script, it should be easy to write yourself a plugin or function to use google's jquery files instead.
The scripts are already updated with WP updates, so WP updates also could cripple the sites. CDN solutions might be even better for these kinds of situations since they also provide different versions. The blog owner could simply deregister jQuery v1.4.2 and register jQuery 1.4.1 for example.
Of course I'm aware of that :) If you read my post, I'm also mentioning "reducing the number and the size of the core files". Plus, site owners WITHOUT the knowledge of the benefits of serving the JS files from another server would automatically use the features the plugins provide.
If this is turned on by default it will cause more serious problems than any small ones it may solve.
As an example I often visit customers who don't have wifi in their office and have no onsite IT staff. Mobile broadband is slow, unreliable & makes everything look nasty due to a brutal level of image compression.
The only practical way I can show these people a work-in-progress during a meeting at their site is to have a local version running on XAMPP on a MacBook. If required files are not available this will be impossible.
Saying that it may be worth including as an option for power users, but off by default and turned on by means of a line added to wp-config.php
RSS feed for this topic
You must log in to post.