/ Published in: PHP
URL: http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/
The URL is normative and has nothing to do with the Source. Because so many blog posts with so few solutions (either outmoded or simply not relevant).
This allows you to prevent Wordpress's $script->add(); function (in "wp-includes/script-loader.php") from loading jQuery; then you can load Google's stored copy of jQuery (with gzip, so that you get the as-advertised 19kb, depending on server specifications, though).
Expand |
Embed | Plain Text
<?php wp_deregister_script('jquery'); ?> <?php wp_head(); ?> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Comments
Subscribe to comments
You need to login to post a comment.

Work's great! Thanks!
Thank you for that! Really a useful snippet.