- NewspaperAutoptimize Plugin – install and configuration
- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- NewspapertagDiv Composer – Website Manager
- NewspaperModules Builder in Newspaper Theme
- NewspaperThe Newspaper Mobile Theme: Introduction
- TutorialsFrom WPBakery to tagDiv Composer
- NewspaperBest Of Forums
- TutorialsWhat is Ajax preloading?
- NewspaperHow to Make the Site Faster
Here it is and here’s how I got it:
1. Copied and pasted your child theme functions code
2. Copied and pasted the function td_load_css from the parent theme’s functions code
3. Changed the name from td_load_css to my_td_load_css
4. Changed the line you mentioned to include ‘&subset=latin,latin-ext’
5. Copied the two extra lines I mentioned in my first post and pasted them at the very end
See if this works:
/* ----------------------------------------------------------------------------
WordPress booster framework - this is our theme framework - all the content and settings are there
It is not necessary to include it in the child theme only if you want to use the API
*/
if (!defined('TD_THEME_WP_BOOSTER')) {
include TEMPLATEPATH . '/includes/td_wordpres_booster.php';
}
function my_td_load_css() {
//google fonts
if ((defined('TD_DEPLOY_MODE') and (TD_DEPLOY_MODE == 'demo' /*or TD_DEPLOY_MODE == 'dev' */)) or defined('TD_SPEED_BOOSTER')) { //on demo and dev we load only the latin fonts
//modify this collection if you want to optimize the fonts loaded
//collection url -> : http://www.google.com/fonts#ReviewPlace:refine/Collection:PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700
wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700&subset=latin,latin-ext'); //used on menus/small text
// Above line has been modified in child theme to include '&subset=latin,latin-ext'
} else {
$td_user_fonts_list = array();
$td_user_fonts_db = td_util::get_option('td_fonts');
if(!empty($td_user_fonts_db)) {
foreach($td_user_fonts_db as $td_font_setting_key => $td_font_setting_val) {
if(!empty($td_font_setting_val) and !empty($td_font_setting_val['font_family'])) {
$td_user_fonts_list[] = $td_font_setting_val['font_family'];
}
}
}
if(!in_array('g_438', $td_user_fonts_list)) {//'g_438', //Open Sans
wp_enqueue_style('google-font-opensans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on menus/small text
}
if(!in_array('g_617', $td_user_fonts_list)) {//'g_617', //Ubuntu
wp_enqueue_style('google-font-ubuntu', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_453', $td_user_fonts_list)) {//'g_453', //PT Sans
wp_enqueue_style('google-font-pt-sans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic&subset=latin,cyrillic-ext,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_445', $td_user_fonts_list)) {//'g_445', //Oswald
wp_enqueue_style('google-font-oswald', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Oswald:400,300,700&subset=latin,latin-ext'); //used on content
}
if(!in_array('g_521', $td_user_fonts_list)) {//'g_521', //Roboto
wp_enqueue_style('google-roboto-cond', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_639', $td_user_fonts_list)) {//'g_639', //Vollkorn
wp_enqueue_style('google-vollkorn', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700'); //used on quoates classic
}
}
//add the google style link for fonts used by user
$td_fonts_css_files = td_util::get_option('td_fonts_css_files');
if(!empty($td_fonts_css_files)) {
wp_enqueue_style('google-fonts-style', td_global::$http_or_https . $td_fonts_css_files);
}
//bootstrap - custom built - it was generated via compilation of /external/bootstrap-master/less/bootstrap.less
$responsive = td_util::get_option('tds_responsive');
switch ($responsive) {
case '980_responsive':
wp_enqueue_style('td-bootstrap', get_template_directory_uri() . '/includes/wp_booster/external/bootstrap/td-bootstrap-980-responsive.css', '', TD_THEME_VERSION, 'all' );
break;
case '980':
wp_enqueue_style('td-bootstrap', get_template_directory_uri() . '/includes/wp_booster/external/bootstrap/td-bootstrap-980-not-resp.css', '', TD_THEME_VERSION, 'all' );
break;
case '1170':
wp_enqueue_style('td-bootstrap', get_template_directory_uri() . '/includes/wp_booster/external/bootstrap/td-bootstrap-1170-not-resp.css', '', TD_THEME_VERSION, 'all' );
break;
default:
wp_enqueue_style('td-bootstrap', get_template_directory_uri() . '/includes/wp_booster/external/bootstrap/td-bootstrap.css', '', TD_THEME_VERSION, 'all' );
break;
}
//main theme style - set the TD_DEBUG_USE_LESS flag in /includes/app/td_config.php and the theme will load the less files and compile them for you
if (TD_DEBUG_USE_LESS) {
wp_enqueue_style('td-theme', get_template_directory_uri() . '/td_less_style.css.php', array('td-bootstrap'), TD_THEME_VERSION, 'all' );
//wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.less', array('td-bootstrap'), TD_THEME_VERSION, 'all' );
} else {
wp_enqueue_style('td-theme', get_stylesheet_uri(), array('td-bootstrap'), TD_THEME_VERSION, 'all' );
}
}
remove_action('wp_enqueue_scripts', 'td_load_css');
add_action('wp_enqueue_scripts', 'my_td_load_css')
Hello,
I need to optimize my images but i can’t find a good plugin for the job. I mainly use PNG pictures on my site.
I’ve checked out the ‘Pagespeed’ topic on the forums but people recommend ‘EWWW Image Optimizer’, but unfortunately i can’t use this plugin because i get the error:
EWWW Image Optimizer requires exec(). Your system administrator has disabled this function.
Are there anymore plugins i can use that don’t affect this theme?
Many thanks 🙂
You might have a wait. Not everybody who is on the forum has time to fix your server for you. Your first chore would be to read through all the posts in the PageSpeed topic where many folks, including myself, have provided a wealth of FREE advice on how to optimize your server, pagespeed, caching, htaccess and set your server settings properly for gzip/deflate, time to live headers, etc.
The “tagdiv speed booster” plugin is only designed to help with issues of loading js and css files in the most efficient manner for the theme; it doesn’t do anything for your server side caching, account speed on the net (response time), gzip/deflate, expiration headers, or image compression. Put another way it’s not a “config file” for your server, it’s preset to speed up the theme, rather seamlessly in most cases. While you can add to it, if you need to have an additional plugin or something “optimized” for loading when theme pages load, it will NOT fix issues on your server or the content you upload.
Advice would be to first optimize your site content such as using GTMetrix to check your site for server side elements which need to be addressed FIRST, then move on to elements which can be addressed via htaccess, optimize images, and the like. Do all your checks with mod_pagespeed off as this caches elements while you’re working on things. Set the tagdiv speed booster last (only edit it if you understand what you’re doing); then when you have a decent setup, then switch on mod_pagespeed.
However, as noted in the PageSpeed topic, gzip/deflate, expires headers, and the like are good for 20 points all alone. Most common issue if your score is below 80 desktop.
Also, remember this forum provides theme support from the developer, not server management support. You need to learn to manage your server and hosting setup, and this is necessary regardless of what theme you run. So, unless you address those issues first, then the elements to fix in WordPress will not be very effective.
I’m sure Marius will be happy to help with questions on the td_speedbooster plugin included with the theme, but you really should read through the PageSpeed topic since I’ve provided a wealth of advice, and how-to elements there which are critical to optimizing your site — including my own mod_pagespeed settings!
-
This reply was modified 11 years by
simchris.
Always glad to help 🙂
I’ve been tweaking PageSpeed on a daily basis since we setup our new web server last December (or rather, I started last year on this topic, but then ran into needing new web server in order to run mod_pagespeed). We run a mix of both WordPress and old-school shtml sites, and so it’s been a challenge to optimize some things for both, especially on our main business website where we have 15 years of static content, wordpress ‘blog’ and then new area for content using wordpress, plus ecommerce area, all on one domain. Fun times! 🙂
I’m super happy with Newspaper, as the devs have been one of the *few* WP devs who understand that it’s not good anymore to have 12 js files and 5 css files linked from every page. One theme I looked at the other day “required” a child theme, and had 15+ js/css files, and one loaded from the child theme not the parent theme. Really nice theme, but very badly architected for modern PageSpeed.
So, in case I haven’t said so lately to Radu and co. BRAVO!!!!!!!!!!!!
-
This reply was modified 11 years by
simchris.
Well, in my own testing photon did NOT work properly on numerous fronts as it’s not the best way to manage optimization and placement, at least on our sites. It’s loading those images off wp.com and not your own site, so it will be slower and not managed locally by your own site/server speed. A lot of that stuff is for newbies who don’t want to dig in and manage their own site; it’s not for power users at all!
If you look through my posts on this topic, try instead
1) changing default setting for WordPress which uses server side imagemagik modules, change in functions.php by adding directive to set quality at 60 (default is 90)
2) use the plugin for auto creating featured images
3) use the plugin to auto resize images from featured image
These help to manage correct sizes, optimized images without going through another server (wp.com), and I don’t get warnings about any image issues from PageSpeed.
Hi again, So I get the following scores on http://www.styzic.com
Desktop = 97
Mobile = 60
https://developers.google.com/speed/pagespeed/insights/?url=www.styzic.com
On desktop adsense ads are enabled and it’s still fair and better than theme demo page ( score = 90). But two things that are annoying for on mobile are:
1) Optimize Images: I have optimized all images and this warning does not show on desktop but only on Mobile. When I turn jetpack photon off the warning is gone. Jetpack uses quer strings to resize images and that’s the reason.
2) Eliminate render-blocking CSS: This warning doesn’t occurs for js as they are defered. My css are at the bottom of the page but still this warning appears. I’ve minified the css files.
So, any bdy out here who might be so generous to help with Photon and async css?
I’ve tried all plugins in the sticky threads here but none of them could async the 3 css files.
Thanks, Shashank 🙂
I tried many times to clear render blocking css and JS but not successful. I hope someone here will help me out.
Here is my speedbooster.php file
<?php
/*
Plugin Name: tagDiv speed booster
Plugin URI: http://tagdiv.com
Description: Speed booster for Newspaper theme - It moves the styles and all the scripts of the theme to the bottom. It also activates internal theme optimizations for better speed.
Author: tagDiv
Version: 2.5
Author URI: http://tagdiv.com
*/
/*
* 2.6 - fixed rendering bug on the loading of the page
* 2.5 - code improvements, newspaper 4 compatibility
* - makes most of the javascript files use defer parsing
* - better compatibility with revolution slider
* 2.4 - updated jquery version
* - support for https
* 2.3 - fixed warnings when trying to move javascript files that are not registered
*/
class td_speed_booster {
var $load_contact_form_7 = '';
var $load_google_fonts = '';
var $styles_for_footer = array();
var $async_js_scripts = array(
'contact-form-7',
'bbpress',
'woocommerce',
'site',
'devicepx',
'js_composer_front'
);
function __construct() {
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts_hook'), 100);
add_action('wp_footer', array($this, 'wp_footer_hook'), 15);
add_action('wp_head', array($this, 'wp_head_hook'), 15);
define('TD_SPEED_BOOSTER' , 'v2.5');
}
function enqueue_scripts_hook() {
global $wp_scripts;
//$this->move_js_to_footer('bp-legacy-js');
//detect revmin - revolution slider and do not move jquery
if( !is_admin() and !isset($wp_scripts->registered['revmin'])){
if (is_ssl()) {
$td_protocol = 'https';
} else {
$td_protocol = 'http';
}
wp_deregister_script('jquery');
wp_register_script('jquery', ($td_protocol . '://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'), true, '1.11.0', true);
wp_enqueue_script('jquery');
}
//move styles
$this->move_style_to_footer('bbp-default-bbpress'); //bpress old
$this->move_style_to_footer('bbp-default'); //bpress
$this->move_style_to_footer('contact-form-7');
$this->move_style_to_footer('td-bootstrap');
$this->move_style_to_footer('td-theme');
$this->move_style_to_footer('google-font-rest');
$this->move_style_to_footer('woocommerce_frontend_styles');
//jetpack lost styles
$this->move_style_to_footer('jetpack-subscriptions');
$this->move_style_to_footer('jetpack-widgets');
$this->move_js_to_footer('themepunchtools');
$this->move_js_to_footer('revmin');
//bbpress
//remove_action( 'bbp_head', array($BBP_Default, 'head_scripts') );
}
function wp_footer_hook() {
$current_theme_version = '';
if (defined('TD_THEME_VERSION')) {
//get the theme version for style
$current_theme_version = TD_THEME_VERSION;
//on demo mode, autogenerate version hourly + day
if (TD_DEPLOY_MODE == 'demo') {
$current_theme_version = date('jG');
}
}
foreach ($this->styles_for_footer as $style_id => $style_src) {
echo "<link rel='stylesheet' id='" . $style_id . "-css' href='" . $style_src . "?ver=" . $current_theme_version . "' type='text/css' media='all' />\n";
}
}
function wp_head_hook() {
if (defined('TD_THEME_VERSION')) {
echo '<style>body {visibility:hidden;}</style>';
}
}
function move_style_to_footer($style_id) {
global $wp_styles;
if (!empty($wp_styles->registered[$style_id]) and !empty($wp_styles->registered[$style_id]->src)) {
$this->styles_for_footer[$style_id] = $wp_styles->registered[$style_id]->src;
wp_deregister_style($style_id);
}
}
function move_js_to_footer($js_id) {
global $wp_scripts;
if (isset($wp_scripts->registered[$js_id])) {
wp_enqueue_script($js_id, ($wp_scripts->registered[$js_id]->src), '', $wp_scripts->registered[$js_id]->ver, true);
}
}
function async_js_hook($url) {
//check to see if we have js
if (strpos( $url, '.js' ) === false) {
return $url;
}
if ($this->strpos_array($url, $this->async_js_scripts) === false) {
return $url;
} else {
return "$url' defer='defer";
}
}
private function strpos_array($haystack_string, $needle_array, $offset=0) {
foreach($needle_array as $query) {
if(strpos($haystack_string, $query, $offset) !== false) {
return true; // stop on first true result
}
}
return false;
}
}
new td_speed_booster();
And here is my function generated file
registered scripts
common | /wp-admin/js/common.min.js
admin-bar | /wp-includes/js/admin-bar.min.js
utils | /wp-includes/js/utils.min.js
svg-painter | /wp-admin/js/svg-painter.js
wp-auth-check | /wp-includes/js/wp-auth-check.min.js
itsec_file_change_warning_js | http://mydomain.com/wp-content/plugins/better-wp-security/modules/free/file-change/js/admin-file-change-warning.js
itsec_strong_passwords | http://mydomain.com/wp-content/plugins/better-wp-security/modules/free/strong-passwords/js/strong-passwords.js
devicepx | http://s0.wp.com/wp-content/js/devicepx-jetpack.js
wpuf-subscriptions | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/js/subscriptions.js
wp-color-picker | /wp-admin/js/color-picker.min.js
jquery |
media-upload | /wp-admin/js/media-upload.min.js
thickbox | /wp-includes/js/thickbox/thickbox.js
wpuf-chosen | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/admin/../assets/js/chosen.jquery.js
wpseo-admin-global-script | http://mydomain.com/wp-content/plugins/wordpress-seo/js/wp-seo-admin-global.min.js
td-wp-admin-general | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/js/general.js
td-wp-admin-panel-js | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/js/wp-admin-panel.js
suggest | /wp-includes/js/jquery/suggest.min.js
registered styles
admin-bar | /wp-includes/css/admin-bar.min.css
colors | 1
ie | /wp-admin/css/ie.min.css
wp-auth-check | /wp-includes/css/wp-auth-check.min.css
itsec_notice_css | http://mydomain.com/wp-content/plugins/better-wp-security/core/css/itsec_notice.css
wp-color-picker | /wp-admin/css/color-picker.min.css
wpuf-chosen-style | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/admin/../assets/css/chosen/chosen.css
google-font-ubuntu | http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic
td-wp-admin-td-panel-2 | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/css/wp-admin.css
thickbox | /wp-includes/js/thickbox/thickbox.css
wpalchemy-metabox | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/content-metaboxes/meta.css
ithemes-icon-font | http://mydomain.com/wp-content/plugins/better-wp-security/lib/icon-fonts/icon-fonts.css
bbp-admin-css | http://mydomain.com/wp-content/plugins/bbpress/includes/admin/css/admin.css
jetpack-icons | http://mydomain.com/wp-content/plugins/jetpack/_inc/jetpack-icons.min.css
Here what my pagespeed test suggest
Remove Render Blocking Javascript
http://mydomain.com/wp-includes/js/jquery/jquery.js.pagespeed.jm.ocognCjcS2.js
http://mydomain.com/wp-includes/js/jquery/jquery-migrate.min.js.pagespeed.jm.mhpNjdU8Wl.js
http://maps.google.com/maps/api/js?sensor=true
http://maps.gstatic.com/maps-api-v3/api/js/17/15/main.js
http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/js/frontend-form.js.pagespeed.jm.DduuMTRcHs.js
Optimize CSS Deliver of the following
http://mydomain.com/wp-content/plugins/revslider/rs-plugin/css/W.settings.css,qrev=4.3.8.pagespeed.cf.DyIPD1r_80.css
http://mydomain.com/wp-content/plugins/revslider/rs-plugin/css/W.captions.php,qrev=4.3.8.pagespeed.cf.VUw1T7K7S2.css
http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/css/W.frontend-forms.css.pagespeed.cf.vemqQTxrMU.css
http://fonts.googleapis.com/css?family=Roboto%3A400%2C700
I am also using Dreampress which is on varnish cache. I enabled Page Speed Mod as well. No other caching plugin.
My Page Speed Score is 64 for desktop and 41 for mobile.
Further, Here is what i added in my httaccess
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedModifyCachingHeaders off
</IfModule>
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 604800 seconds"
ExpiresByType image/jpeg "access plus 604800 seconds"
ExpiresByType image/png "access plus 604800 seconds"
ExpiresByType image/gif "access plus 604800 seconds"
ExpiresByType application/x-shockwave-flash "access plus 604800 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
#ExpiresByType text/html "access plus 600 seconds"
#ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
Now please suggest me what to do for increasing my page speed. My site is damn slow. Please help me to correct the speedbooster.php file as per instructions. Special request ot Christopher for helping me out. Thanks
Yup. Web server is different from a local PC since you don’t control the PHP settings, security settings, or the order things load, or external async elements.
You can’t presume anything that works on localhost will work on web; and fact that it doesn’t would likely cause one to reconsider use of “brilliant” in this context.
My experience has been – test on the web with the actual server. Some plugins are not tested against say an nginx environment vs an apache environment, or with timing of how things load in production environment on server, even though one would assume if it works on localhost or virtual machine it should work on the web, not always so.
I’ve had a lot of great plugins which break on version xxx of WordPress, and can never be used ever again. Also note that the theme has been optimized around some of the pending changes for WP 4.0, and not all plugins have done that yet.
But you asked me to look at this, so just giving you my thoughts. If it doesn’t work on the server, you need to figure out what is loading before it that breaks it.
-
This reply was modified 11 years by
simchris.
Hi, Mehedi
I usually try to use the js and css minifier links I’ve posted couple of times in the pagespeed topic …
You can also “try” to use the GTmetrix optimized versions they do for you, but I usually only minify the main couple of files (don’t recall which ones at the moment)…
You can try these
http://javascript-minifier.com/
I use the CSS one all the time.
@JBH
Hi, looks like setting proper folder permissions on your site really helped to start 🙂
But, looking at your example post page you have a LOT of work to do.
most of your errors have nothing to do with the theme; so you’re going to want to address all that stuff first. Possibly find better solutions for what you’re doing with some of those external systems. Basically you’re loading too many things from external sites, which will lower your scores; more than 5 external things is bad for speed.
For example – this is crazy:
This page has 29 external Javascript scripts. Try combining them into one. This page has 13 external stylesheets. Try combining them into one. This page has 7 external background images. Try combining them with CSS sprites.
Note you can’t do much about the stuff you’re loading from other sites/servers, but you should
1) remove “versioning” — implement the .htaccess (if running Apache) and functions.php suggestions which I’ve posted, especially for the remove of the version tags. If running child theme you may need to put in child version; not sure on that.
2) optimize javascript delivery; use the td speed booster plugin to help with theme resources; but it won’t help with external stuff you’re loading
3) you cant do anything about the image dimensions of the things being loaded off external websites
4) prefer async – you’d have to hack whatever plugin you’re using for Facebook to load that as async
5) optimize images – be sure what you upload is already as small as possible; also use something like smushit or similar; possibly use my functions.php code for setting smaller default compression size for WordPress built in function (e.g., change from default 90 to 6); then do regenerate thumbnails — boom everything 20% smaller!
7) consistent URL errors coming from your “leadpages” stuff
8) vary encoding errors – coming mostly from leadpages
9) redirect issues – whatever you’re doing with Facebook and Google generating errors
10) bad request with favicon
(etc.)
@Steven pretty much said what I had on my mind in very diplomatic way.
@cherry = Seems it might make sense to try to optimize your server/CDN/ etc. with the default theme for WordPress while you’re learning how to do this, then switch to the big theme once you have your foundation set in stone, as it were. There are many many sites out there which detail how to optimize a WordPress site, server, caching, CDN, PageSpeed, etc. – before you even get to the theme features.
thank you – I’ll do that.
After all, I’m fed up with all this, will try to optimize these last things (best as I could p.e minify the main css) and then focus on another things. (as you maybe notice I’m to focused in that)
sorry for all my questions by the way. I’m pretty new to this.
Hi Cherry
you might want to keep ONE thread, vs starting three or more regarding your site and pagespeed. Basically if you get all the things updated already covered in your other two threads, then mobile speed will also increase.
Again, as I’ve noted previously, you can’t do anything about the external ads being served which impact speed. Not sure how you’re loading ads on a demo site anyway, frankly. You should turn ads OFF for testing your “actual” speed. So the “errors” for mobile for the javascript and images from Google ads and advertisement browser caching, are impacting your score but nothing you can address and are false positives vis a vis the site and theme.
You *can* minify the main .css file which is showing as NOT minfied, as we’ve already covered in your prior threads.
Minifying http://cherrykoks.de/…ntent/themes/Newspaper/style.css?ver=4.1 could save 7.1KiB (16% reduction) after compression.
And basically don’t use contact form 7 unless you actually need it. Since you don’t have a live site, why would you need somebody to contact you anyway at this stage of your playing with the theme and setup without actual content. If you’re planning to use that, then you could presumably add its css to bottom of the main style.css, then hack the plugin to not write its own CSS into the head of the theme; or this would be example of where — as you’d asked elsewhere — you would add the plugin to the speedbooster plugin code to get it dumped at bottom of theme and optimized.
And remember best to test a post page for score not home page, since most people do NOT land on a site home page, but “surf in” to content from a social media link/share, or search result page, etc. — home page will always be a trickier prospect since it’s not indicative of the rest of the site, using sliders, modules, more photos, ajax loads, etc.
Also be aware you cannot get a 100/100 score with a WordPress site running numerous photos, plugins, ads, social media hooks, etc. Only people who have accomplished this have done custom sites without images, using CDN, and custom coding to maximize above the fold content load separate from below the fold content.
If you get above 80 on mobile and above 90 on desktop, you can really get on with your life and worry about content and marketing.
-
This reply was modified 12 years by
simchris.
I love the new lightbox, and would enjoy it even more if it could replace the Responsive Lightbox plugin I’ve used as long as I’ve used this theme. It’s just one more thing slowing down page speed, even on a well optimized site.
After some digging, I found that if you select an image inserted into the content, you can choose to have the tagDiv lightbox applied to the image.
I want to dump the other plugin, but I need its automatic functionality. I run a multi-author site so I can’t go into every post to set every image to use the tagDiv modal lightbox.
Please make your lightbox an automatic for any image in a post that links to the full size image. It’s better to have us turn that featured off than on, by default. Even better still, you could add an option to the settings to set the tagDiv lightbox on or off for all linked images by default.
Ok now, here’s the story:
I deleted my whole blog because still having issues. So I reinstalled everything new (had the demo running, now own build) I also thought, that Cloudflare would be the problem- but it isn’t (right now I don’t use CF)
Christopher Simmons helped me a lot- so I was able to solve a lot of things on my own.
But there are still some things I can’t handle on my own (seems like it) – and I’m on the edge of despair.
FYI my installed plugins:
tagbooster, W3 Total Cache, wpSeo, Code Embed, TinyMCE, Animated Gif Resize, Antispam Bee, Async JS and CSS, Broken Link Checker, Contact Form 7, EWW Image Optimizer, Jetpack, Query Strings Remover, WP DB-Manager, Google XML Sitemaps and the Visual Composer.
No matter what I do (installing Query Strings Remover or adding a code to the functions.php) I STILL HAVE PROBLEMS WITH THE “REMOVE QUERY STRINGS”
I really need someone to help me fix this or show me how to! I’m so helplessly I could cry over this!
I would like to start with adding content, but this makes me really desperate
The claimed files are:
Remove query strings from static resources
C (70)
88%
Content High
What does this mean?
Resources with a “?” in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:http://cherrykoks.de/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=4.1
http://cherrykoks.de/wp-content/themes/Newspaper/includes/wp_booster/external/bootstrap/td-bootstrap.css?ver=4.1
http://cherrykoks.de/wp-content/themes/Newspaper/style.css?ver=4.1
Next one is:
Specify a cache validator
A (90)
93%
Server High
What does this mean?
The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources:http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700?ver=4.1
http://gtmetrix.com/reports/cherrykoks.de/4u0OTZRR
Note: I use as fonts: Georgia and Times New Roman over the whole blog! I was reading a lot of threads with tips as “Comment them out” “delete it” and this is also not working. When I try to comment out in functions.php I get a syntax error. And to delete: I don’t know which lines, because my functions.php looks a little bit different.
The font problem also appears in :
Add Expires headers
B (89)
25%
Server High
What does this mean?
There is 1 static component without a far-future expiration date.
http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700?ver=4.1
Page Speed Insights for example is complaining about the “above the fold” thing on mobile Devices and desktop, these are the same files- which GTMetrix claims with “remove query strings”
see here: https://developers.google.com/speed/pagespeed/insights/?url=cherrykoks.de&tab=mobile
Everything else is ok for me- but how can I solve the “few” problems.
I hope there’s an angel in this forum who can save me from getting nuts.
If someone of you needs any file information, let me know. I’m glad for any help with this!
Julia
Well the commenting out like here:
http://screencast.com/t/AJFofBi3Ym
did not work for me, when I did this – I got a syntax error.
my googlefonts section in the functions.php looks like this:
//google fonts
if ((defined('TD_DEPLOY_MODE') and (TD_DEPLOY_MODE == 'demo' /*or TD_DEPLOY_MODE == 'dev' */)) or defined('TD_SPEED_BOOSTER')) { //on demo and dev we load only the latin fonts
//modify this collection if you want to optimize the fonts loaded
//collection url -> : http://www.google.com/fonts#ReviewPlace:refine/Collection:PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700
wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700'); //used on menus/small text
}
else {
$td_user_fonts_list = array();
$td_user_fonts_db = td_util::get_option('td_fonts');
if(!empty($td_user_fonts_db)) {
foreach($td_user_fonts_db as $td_font_setting_key => $td_font_setting_val) {
if(!empty($td_font_setting_val) and !empty($td_font_setting_val['font_family'])) {
$td_user_fonts_list[] = $td_font_setting_val['font_family'];
}
}
}
if(!in_array('g_438', $td_user_fonts_list)) {//'g_438', //Open Sans
wp_enqueue_style('google-font-opensans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on menus/small text
}
if(!in_array('g_617', $td_user_fonts_list)) {//'g_617', //Ubuntu
wp_enqueue_style('google-font-ubuntu', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_453', $td_user_fonts_list)) {//'g_453', //PT Sans
wp_enqueue_style('google-font-pt-sans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic&subset=latin,cyrillic-ext,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_445', $td_user_fonts_list)) {//'g_445', //Oswald
wp_enqueue_style('google-font-oswald', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Oswald:400,300,700&subset=latin,latin-ext'); //used on content
}
if(!in_array('g_521', $td_user_fonts_list)) {//'g_521', //Roboto
wp_enqueue_style('google-roboto-cond', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_639', $td_user_fonts_list)) {//'g_639', //Vollkorn
wp_enqueue_style('google-vollkorn', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700'); //used on quoates classic
}
}
//add the google style link for fonts used by user
$td_fonts_css_files = td_util::get_option('td_fonts_css_files');
if(!empty($td_fonts_css_files)) {
wp_enqueue_style('google-fonts-style', td_global::$http_or_https . $td_fonts_css_files);
}
I placed the Comment out before : //google fonts and after 00,700|Roboto+Condensed:400italic,700italic,400,700′); //used on menus/small text
}
thank Lord I made a backup 😀
I’m still not happy with the pagespeed on http://www.dailycat.de even I have optimized it quite a bit. Thus I set up google analytics page speed tracking. Maybe the results are interesting for the tagdiv team.
Mobile devices and especially tablet devices load much slower than desktop. I know, gsm and edge connection aren’t the best, however maybe its reasonable to load smaller images and reduce page heaviness for mobile devices.
https://www.dropbox.com/s/hbwpl7r4tfr6nhk/pagespeed-device-comparision.png
Second, there are some mobile devices which are much slower than others. especially android mobile. The followeing screen is the page load time compared to the websites average. I think it may be worth taking a look at the page speed performance of safari and mobile android browser, since the amount of people using them are significant.
https://www.dropbox.com/s/o43rv8lcb6ltm0n/pagespeed-mobile-android-browser-slow.png
https://www.dropbox.com/s/wlhhyj8uxe9y9qy/pagespeed-safari-slow.png
Any Ideas to improve performance on dailycat are welcome! Thx, guys for this awesome community here!
-
This reply was modified 12 years by
Manuel Fink.
Try this?
https://wordpress.org/plugins/featured-image-in-rss-feed/
or if able to edit your functions.php file
(code credit: http://brandswithfansblog.fandommarketing.com/how-to-optimize-rss-to-display-featured-blog-images/ )
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'style' => 'float:left; margin:0 15px 15px 0;' ) ) . '' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');
-
This reply was modified 12 years by
simchris.
Hi, I wouldn’t worry about those two images which are sized with CSS, as they may technically be false positives on GMetrix. Google doesn’t advise you about that, so the fact you have 92 desktop with the ads and fonts “on” isn’t too shabby.
I’d focus more on removing the versioning queries on stuff (blah?=version4.1) which can be done by editing functions.php file, or some plugin might help. I’d also minify the css and java that google recommends here:
https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fcherrykoks.de%2F&tab=desktop
Minifying http://cherrykoks.de/…ntent/themes/Newspaper/style.css?ver=4.1 could save 8.3KiB (19% reduction) after compression.
As a perfect example of how imperfect this adventure is, you’ll note most of the “errors” come from Google’s universe and not your site !
Turn off the revolution slider plugin if not using it, since it adds the two CSS style sheets Google cautions about, and recommends combining.
Most important however is your mobile score which is 75; and you want that 80 or higher. Right now the revolution slider CSS is hurting that, along with one image you uploaded which is not well optimized.
Compressing and resizing http://cherrykoks.de/…wp-content/uploads/2014/08/3-745x483.jpg could save 108.6KiB (87% reduction).
-
This reply was modified 12 years by
simchris.
You just need a plugin like “EWWW Image Optimizer” every time you upload a image the plugin will fixed it for you…
Google has always recommended optimization of images; and this is why tools like Smushit, and modification of the default compression level in the functions.php file are so important, in addition to properly optimizing the images in Photoshop or similar to the lowest possible size that doesn’t suck BEFORE you upload them.
You can generally ignore any mention of any image needing 1kb of optimization. Remember Google’s info is “recommendation” not “the law.” If your site is over 90 desktop and over 80 mobile you don’t need to worry about “slow site speed penalties” which supposedly now exist. For example, for some images we like to embed the copyright info for legal reasons, which is meta data; technically you can make image smaller by removing that. Well, maybe I don’t want to 😉
Also, FYI, the speed for an average page in the Newspaper demo, is “94” desktop — but you are correct the demo for mobile is getting “under 70” due to the images on the latest demo not being fully optimized, which I’m sure Radu and folks will address soon as they got a bit sidetracked on the 4.0 fixes and updating the docs.
Right now the only plugin you need is “The theme SpeedBooster” and good cache plugin and leave the rest to cloudflare…
The plugins i’m using right now to better my site in speed and SEO is:
1.WP Super Cache
2.EWWW Image Optimizer
3.Leverage Browser Caching Ninja
4.Noindex Attachment Pages
5.Optimize Database after Deleting Revisions
6.SEO Friendly Images
7.tagDiv speed booster
8.TTT Devices
9.CloudFlare
10. HTML5 Boilerplate optimized performance
11.Code Snippets (TO ADD MY functions.php files) don’t need to go in my theme to add any thing through this plugin i can do it from the admin side..
I’m running the PageSpeed Insights and receiving a terrible result. On desktop im receiving a 65/100 – and I wanted to point out a lot of is has to do with ‘CSS’ (same with mobile). It’s telling me to optimize css deliver of the following (http://screencast.com/t/z9EIqVts0B2). Any suggestions? (v. 4.0.2)
What I do is use the links found in my posts under the page speed topic, and just manually minify the main style.css file, and main .js file.
E.g., for CSS:
cssminifier.com
for JS:
http://gpbmike.github.io/refresh-sf/
basically paste the main style.css file into the minifier, then copy and paste the minified version back into the styles file and then upload/over-write main one on the server. Takes 2 minutes. Done.
If you read the other sticky on speed by “Steven”, he has been using a minify plugin that seems to work.
In my case mod_pagespeed minifies my HTML, so don’t have to deal with that. I then use cssminifier to optimize the main css file.
Since I have to do couple of hacks to my functions.php file, and switch on the author name on posts, home page modules, and swap out the field name for view counter to our existing field with EVERY update, it’s not much more work to do the CSS and JS minify on main couple of files each time as well. No plugins needed 🙂
And, another option – if you use GTMetrix to test your site … they can actually spit out “optimized” versions of stuff for you, which is cool.
Just as an anecdote on minification:
minifying the main style.css file will take the size from 286kb to 204kb, as savings of about 80kb, which is actually quite a bit.
Tried all pplugins one can find but none of them work correctly.
Autoptimize works but it generates minified files for every page every time a new user visits… Cache becomes more than 100 mb in half an hour…
Any solution?
SS