kasparsd / minit

A WordPress plugin to combine CSS and Javascript files.
GNU General Public License v2.0
286 stars 46 forks source link

No change with plugin #37

Closed theorganicon closed 8 years ago

theorganicon commented 9 years ago

Hello,

Upon activating the plugin, Google Page Speed Test continues to give this alert: "Eliminate render-blocking JavaScript and CSS in above-the-fold content." Please advise.

Also, how does one keep the plugin updated, once installed?

Thank you very much for your plugin and endeavors.

santo007 commented 9 years ago

Hello @theorganicon the suggestion and solution for Eliminate render-blocking JavaScript and CSS in above-the-fold content. is the following What it is ? The problem is that js are loading below body tag which makes the page much time to load.Therefore you need to move your js after body tag Solution
Just add the following script to functions.php which is located in your themes folder

function footer_enqueue_scripts() {
   remove_action('wp_head', 'wp_print_scripts');
    remove_action('wp_head', 'wp_print_head_scripts', 9);
    remove_action('wp_head', 'wp_enqueue_scripts', 1);
    add_action('wp_footer', 'wp_print_scripts', 5);
    add_action('wp_footer', 'wp_enqueue_scripts', 5);
    add_action('wp_footer', 'wp_print_head_scripts', 5);
}
add_action('after_setup_theme', 'footer_enqueue_scripts');
theorganicon commented 9 years ago

Thank you so much. If it still does not work for my particular site when I reinstall the plugin, should the code remain? Will it interfere with other plugin code?

On Jan 23, 2015, at 6:42 AM, santo007 notifications@github.com wrote:

Hello @theorganicon the suggestion and solution for Eliminate render-blocking JavaScript and CSS in above-the-fold content. is the following What it is ? The problem is that js are loading below body tag which makes the page much time to load.Therefore you need to move your js after body tag Solution

Just add the following script to functions.php which is located in your themes folder

function footer_enqueue_scripts() { remove_action('wp_head', 'wp_print_scripts'); remove_action('wp_head', 'wp_print_head_scripts', 9); remove_action('wp_head', 'wp_enqueue_scripts', 1); add_action('wp_footer', 'wp_print_scripts', 5); add_action('wp_footer', 'wp_enqueue_scripts', 5); add_action('wp_footer', 'wp_print_head_scripts', 5); } add_action('after_setup_theme', 'footer_enqueue_scripts'); — Reply to this email directly or view it on GitHub.

santo007 commented 9 years ago

@theorganicon Minit just combines css and js(IF you are not developer or you dont know any programming language just skip to solution)
For example if i have 5 css and js files.It is easier to make a single http request rather than making 5 requests(here request refers to downloading the css and js files which are optimized on browser side)
This is what minit plugin does
It doesnt make all pagespeed optimisations
solution
Since you are adding the provided code in functions.php which is located in your themes folder the code remains even though you reinstall the plugin.

theorganicon commented 9 years ago

Thank you so much. We shall give this a try!

On Jan 23, 2015, at 7:04 AM, SANTOSHKUMAR notifications@github.com wrote:

@theorganicon Minit just combines css and js(IF you are not developer or you dont know any programming language just skip to solution)

For example if i have 5 css and js files.It is easier to make a single http request rather than making 5 requests(here request refers to downloading the css and js files which are optimized on browser side)

This is what minit plugin does

It doesnt make all pagespeed optimisations

solution

Since you are adding the provided code on functions.php which is located in your themes folder the code remains even though you reinstall the plugin.

— Reply to this email directly or view it on GitHub.

kasparsd commented 8 years ago

Closing because not really an issue with the plugin.