Use Google Libraries
A number of the javascript libraries distributed with WordPress are also hosted on Googleâs AJAX Libraries API. This plugin allows your WordPress site to use the content distribution network side of Googleâs AJAX Library API, rather than serving these files from your WordPress install directly.
This provides numerous potential performance benefits:
- increases the chance that a user already has these files cached
- ãµã¼ãã¼ã®è² è·ã忏
- uses compressed versions of the libraries (where available)
- Googleâs servers are set up to negotiate HTTP compression with the requesting browser
For a more detailed look see Dave Wardâs 3 reasons why you should let Google host jQuery for you.
ãµãã¼ããã¦ããã©ã¤ãã©ãªã¨ã³ã³ãã¼ãã³ã
ãªã³ã¯
- Use Google Libraries ãã¼ã
- ã¤ã·ã¥ã¼ãã©ãã«ã¼
- GitHub ãªãã¸ããª
- ãµãã¼ããã©ã¼ã©ã
äºææ§ã®ãªããã©ã°ã¤ã³
WordPress Minify ã®æ¹å
Better WordPress Minify version 1.2.2 does not yet support protocol-relative URLs, but the next release is supposed to correct this.
Gravity Forms
Iâve had reports of Gravity Forms breaking UGL, but I donât have access to Gravity Forms, so Iâm not sure whatâs going on. If you need Gravity Forms you might need to disable UGL, or it might be fine, Iâm not really sure.
WP-Minify
WP-Minify doesnât yet support protocol-relative URLs. Add â//ajax.googleapis.com/â as a JS and CSS exclusion.
äºææ§ã®ãªããã¼ã
K2
Iâve had scattered reports that UGL is stepping out of the way when using K2.
ãªã¯ã¨ã¹ã
If youâre going to flag the plugin as âbrokenâ in the WordPress Plugin Directory, please try and let me know what is broken. Iâm not a mind reader.
æè¡çãªè©³ç´°:
Use Google Libraries ã¯ä»¥ä¸ã®ããã¯ã使ç¨ãã¾ã (ããããåªå 度ã¯1000ã«ãªã£ã¦ãã¾ã)ã
wp_default_scripts
Use Google Libraries compares itâs list of supported scripts to those
registered, and replaces the standard registrations src with ones that
point to Googleâs servers. Other attributes (like dependencies) are left
intact.
script_loader_src
Use Google Libraries removes the ver=x.y.z query string from the URL
used to load the requested library if it is going to load the library from
ajax.googleapis.com. Otherwise the URL is left unaltered. This both
improves the chances of the given URL already being cached, and prevents
script.aculo.us from including scripts multiple times.
If jQuery is enqued Use Google Libraries will inject a bit of javascript before the next enqueued script enabling jQueryâs noConflict mode as it would with the standard WordPress version.
ãªãã¡ã¬ã³ã¹
Parts of this plugin (specificly, the dropping of the micro number, which has since been removed for better caching performance) were inspired by John Blackbournâs Google AJAX Libraries, which has very similar goals to this plugin.
å°æ¥ã®è¨ç»
- add ability to disable protocol relative URLs
- add ability to disable on frontend and/or admin