>
Download This Plugin | |
Download Elegant Themes | |
Name | HeadJS Loader |
Version | 0.2 |
Author | ChuckMac |
Rating | 60 |
Last updated | 2013-01-25 01:29:00 |
Downloads |
7409
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
HeadJS Loader plugin added 10 kB of resources to the Home page and 9 kB of resources to the sample Post page.
HeadJS Loader plugin added 1 new host(s) to the Home page and 1 new host(s) to the sample Post page.
Great! HeadJS Loader plugin ads no tables to your Wordpress blog database.This plugin reformats your page to utilize Head JS in your WordPress site.
Caution: this plugin can cause major issues with the javascript on your site if not implemented properly. Please be sure to test on a development server first
It strips out all your old javascript declarations and puts them into head.js calls so that they are loaded in parallel (see the Head JS website for more details).
Optionally you can wrap all your inline javascript with head.ready calls.
For example, this:
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/prototype.js?ver=1.6.1'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=3.0.4'></script>
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.3'></script>
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/builder.js?ver=1.8.3'></script>
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/effects.js?ver=1.8.3'></script>
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/dragdrop.js?ver=1.8.3'></script>
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/slider.js?ver=1.8.3'></script>
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/controls.js?ver=1.8.3'></script>
Becomes:
<script type="text/javascript" src="http://yoururl.com/wp-content/plugins/headjs-loader/js/head.min.js"></script>
<script>
head.js("http://yoururl.com/wp-includes/js/prototype.js?ver=1.6.1",
"http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=3.0.4",
"http://yoururl.com/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.3",
"http://yoururl.com/wp-includes/js/scriptaculous/builder.js?ver=1.8.3",
"http://yoururl.com/wp-includes/js/scriptaculous/effects.js?ver=1.8.3",
"http://yoururl.com/wp-includes/js/scriptaculous/dragdrop.js?ver=1.8.3",
"http://yoururl.com/wp-includes/js/scriptaculous/slider.js?ver=1.8.3",
"http://yoururl.com/wp-includes/js/scriptaculous/controls.js?ver=1.8.3"
);
</script>
Feel free to contribue to the project on GitHub!