Hi, with newspaper v6 not all the files are being moved to the footer:
– contact-form-7-css
– google-font-rest-css
– js_composer_front-css
– td-theme-css
– jquery.js
– jquery-migrate.min.js
All those files are still in the header, only jquery.form.min.js, scripts.js, tagdiv_theme.min.js, comment-reply.min.js and js_composer_front.js) are moved to the footer.
What can I do to move alle the files to the footer? Shouldn’t it work?
Hi,
Please make sure you have the tagDiv Speed Booster plugin active in System status panel http://screencast.com/t/KR1QcvUzZMZL
I have the version 4.1 of the plugin, this version will be available in the next theme version 6.1 that is in themeforest queued.
I will re post my message from another thread here:
Hi,
I’m still searching for a good solution for that plugin. A lot of people install the plugin without knowing what it does and after that they add 100 plugins and some of the plugins are not written ok. For example some of the plugins do not respect the google pagespeed recommendations of punting javascript at the end of the page and they just try to use jQuery in the middle of the page. This slows the site down and it also enforces the requirement that jQuery has to be in the header instead of the footer how Google recommends.
For example even Revolution Slider is written that way, not only that but they don’t use recommended WordPress methods to load it’s style and js. One may say that loading resources that way is bad BUT even jetpack (that is a plugin made by the makers of wordpress) doesn’t use standard ways of loading resources – you can find the jetpack hack in the speed booster.
I know this is causing a lot of frustrations but we don’t have a good solution yet 😐 .
To always enable speed booster, delete this code: http://screencast.com/t/RZLIOPUNdqh
Hi Radu,
On your demo website I see that you have the same problem: bbpress.css, js_composer.css, style.css are also in the head and not in de footer:
<link rel=’stylesheet’ id=’bbp-default-css’ href=’http://demo.tagdiv.com/newspaper/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5.7-5693′ type=’text/css’ media=’screen’/>
<link rel=’stylesheet’ id=’js_composer_front-css’ href=’http://demo.tagdiv.com/newspaper/wp-content/plugins/js_composer/assets/css/js_composer.css?ver=4.5.2′ type=’text/css’ media=’all’/>
<link rel=’stylesheet’ id=’td-theme-css’ href=’http://demo.tagdiv.com/newspaper/wp-content/themes/011/style.css?ver=6.1d2′ type=’text/css’ media=’all’/>
Are you also using the wrong plugins or is something else not going ok.
This problem I didn’t have with version 6 after commenting the stuf you showed in the screencast.com
As he noted, not everything can be moved due to the imperfect programming of some plugins; so those “bad” plugins cannot be moved as they may break things.
CSS generally is loaded in the header – this is correct practice. JS is loaded in footer unless some plugins “require” it in header to even work.
That is the quandary that Radu describes which there is no simple solution for.
Upshot: the speed booster plugin can “help” move some things, but not all or stuff just won’t work — through no fault of the theme or the speed booster framework TagDiv have come up with.
The only thing is what I don’t understand, if I use the speedbooster plugin (v4) of version 6.0 and comment out the return:
if (!in_array($active_plugin, $this->allowed_plugins)) {
define(‘TD_SPEED_BOOSTER_INCOMPATIBLE’ , $active_plugin);
//return;
}
}
js_composer.css and styles.css are moved to the footer.
But if I use speedbooster plugin (v4.1) of version 6.1 and I do the same then the js_composer.css and styles are moved to the footer.
I should aspect that this should work the same, but in this case v4.0 was doing a better job.
Hi,
The theme js and the js coming from certain plugins depend on jquery. If you set it to async the js may load before jquery and errors may appear because of this. This is a general issue and there’s no solution for it yet. If you move them at the bottom most of the html content is loaded before executing the js and the penalty is smaller. Google may still penalize you if you have too many resources, even if all those resources are moved at the page bottom.
Thank you!