Search Results for 'pagespeed'

    No search results were found in Documentation!

Results from the Forum
Bichareh
Participant
#0

Hi,

what would you say is the best solution to improve the speed of the Newsmag theme – WP Rocket or the Speed Booster Plugin?

Thank you!

Emil G
tagDiv Staff

Hi,

The theme doesn’t require code modifications, all solutions provided by me are either server optimizations (gzip compression, browser leverage), image optimization (when you deliver uncompressed/uncropped images and your page has 4-6Mb multiplied with a large number of visitors it will certainly lead to a blockage), cache. The Speed Booster is not that important, it will just move js and css at the page end giving the illusion that the page loads faster because the js/css executes after the other content elements are loaded. All those optimizations should be done regardless of the theme used and unfortunately we couldn’t include them in the theme as an automatic feature. I’ve made a guide here – https://forum.tagdiv.com/how-to-make-the-site-faster/ – the setting presented on the guide were taken from our demo server – also it requires to regenerate the thumbs – https://forum.tagdiv.com/how-to-fix-strange-thumbnails/

There are also discussions on the forum on this subject – https://forum.tagdiv.com/topic/pagespeed/https://forum.tagdiv.com/topic/tutorial-chriss-custom-optimizations-for-functions-php-etc/

Sorry for all the trouble you encountered with our theme, we can offer a full refund, just send us an email at contact@tagdiv.com and we’ll discuss the details.

PS – We’re testing the latest version of VC, on our tests it behave properly, we’re trying to identify why it uses so many resources on some of our clients servers. We advise anyone who has trouble with the latest version to switch to the previous one (4.3.5) which should work fine.

Thank you, Emil G.

  • This reply was modified 11 years by Emil G.
  • This reply was modified 11 years by Emil G.
Emil G
tagDiv Staff

Hi,


@Rabattix
– please provide the url so i we can take a look, if you don’t want to post it here send it via email at contact@tagdiv.com , sometime the pagespeed test reports render blocking even if the elements are moved at the page bottom.


@nelito
– the other pagespeed improvements are way more important than moving js/css at the page bottom, also it won’t lower the cpu usage. To improve on that you have to reduce the number of queries (fewer plugins, fewer blocks on page, reduce the elements which use ajax requests/pagination like mega menus/load more/infinite load), use cache, set the browser leverage cache, eventually use MySQL Query Cache. If you’re unhappy with the theme please send an email at contact@tagdiv.com and we’ll come with a solution.

Thank you, Emil G.

Emil G
tagDiv Staff

Hi,

I see you didn’t optimized the site – http://screencast.com/t/qY1CL39D
Follow this guide – https://forum.tagdiv.com/newspaper-documentation/
You can also check this – https://forum.tagdiv.com/topic/tutorial-pagespeed-2015/
Try to reduce the number of blocks on page, reduce the number of elements which come with ajax pagination (mega menus, ajax pagination, load more, infinite load – blocks)
Disable the view counter (it updates the database counter on each page view).
Try to reduce the number of plugins, use only the really important ones.

Hope this helps.

Thank you, Emil G.

simchris
tagDiv Member

You might have to also use some kind of comment removal system or plugin; we use mod_pagespeed for that.

Note however the style classes are somewhat unique, so a savvy person could figure out which theme you’re using from that.

  • This reply was modified 11 years by simchris.
Rabattix
tagDiv Member

Hello,

first of all, it´s a great theme, but after installing all we need, and following your constructions for more pagespeed, nothing happens.

Lots of them is because of the pictures bus there are more ponts in loading js and css.

Now we followed your instruction to optimize the pagespeed by putting the files in to the footer, but nothing happens.

When we check the site withe the functions.php of the theme, there is also this:

registered scripts
td-external | http://our-domain.tld/wp-content/themes/Newspaper/js/td_external.js
td-site-min | http://our-domain.tld/wp-content/themes/Newspaper/js/min/site.min.js
jquery | http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
registered styles
cptch_stylesheet |
cntctfrm_stylesheet |
google-font-rest |
td-bootstrap |
td-theme |
js_composer_front |

Then we put them to the footer, but this message is also available. What did we do wrong?

The td-speed-booster.php looks like this:

if ($this->is_ie === false and $this->td_theme_name == ‘Newspaper’) {
$this->move_style_to_footer(‘td-bootstrap’);
$this->move_style_to_footer(‘td-theme’); //this is the main style of the theme, it depends on td-bootstrap to load
}

$this->move_style_to_footer(‘google-font-rest’);
$this->move_style_to_footer(‘woocommerce_frontend_styles’);
$this->move_style_to_footer(‘cptch_stylesheet’);
$this->move_style_to_footer(‘cntctfrm_stylesheet’);
$this->move_style_to_footer(‘google-font-rest’);
$this->move_style_to_footer(‘td-bootstrap’);
$this->move_style_to_footer(‘td-theme’);
$this->move_style_to_footer(‘js_composer_front’);

//jetpack lost styles
$this->move_style_to_footer(‘jetpack-subscriptions’);
$this->move_style_to_footer(‘jetpack-widgets’);

/**
* move javascript to footer
*/
$this->move_js_to_footer(‘themepunchtools’);
$this->move_js_to_footer(‘revmin’);
$this->move_js_to_footer(‘jquery’);
$this->move_js_to_footer(‘td-external’);
$this->move_js_to_footer(‘td-site-min’);

Can you help us please?

Thanks

idansx
tagDiv Member

Where these google fonts came from? I have no idea how to limit them!

And how do I eliminate the render-blocking javascripts?
See here: https://developers.google.com/speed/pagespeed/insights/?utm_source=pubinsights&filter_third_party_resources=true&hl=en&url=http%3A%2F%2Fwww.viraldump.com%2Fsimple-message-brought-room-school-kids-absolute-tears%2F&priorityGroup=speed

I really want to get rid of the red warnings…

simchris
tagDiv Member

You limit number of queries by using fewer modules. Every
module on a page is a function to query the dbase. So, obviously if you do less, you use less resources.

Well, depends on your default. If you’re managing your own server you should already know how to edit the php.ini file or change the php settings from host panel, but many systems default to 32MB or 64MB, while I’ve found these days with WP that 256MB is a good “minimum” — if you have a high traffic site, double that. If your main site is the “main” site on your server, try 1GB. Also remember some servers you need to manually type the number into the panel, and the value will actually be something like 1G or 512M and not 512MB.

Upshot — check the default setting; if it’s too low, your site may run out of RAM, and die. SO, good place to start. 🙂

For PageSpeed optimization you can also try my updated “cheat sheet” — see the sticky post that TagDiv admin kindly “stuck” to the top of the forum menu!

Hope that helped.

Main thing — limit the number of Google fonts, external stuff like Jetpack, limit multiple ad networks, test a post page with GTMetrix.com which has some nice “how to fix it” info for common speed problems.

simchris
tagDiv Member

Dunno. Works on our web server where we “host” our sites. Might be some other mis-configuration with your system setup which you can review by looking at your error logs since you manage your own server. Error logs great place to start.

Perhaps try clean install of the plugin?

Do full delete of the folder in /plugins/js-composer/
then do clean install of the plugin.

Try with all other plugins OFF, caching off, mod_pagespeed off, cache cleared.
If you have 4GB RAM for php, and a modern CPU, should work just fine.

The 501/505 error seems to refer to an http header problem.

I’m assuming your site works with WordPress and the default twenty-fifteen theme?

Ref 501/505 errors
http://www.getnetgoing.com/HTTP-505.html

simchris
tagDiv Member

Have you optimized your site for PageSpeed rating?
Have you limited number of queries per post page?
Have you increased the default RAM assigned to php?

simchris
tagDiv Member

When using YouTube videos, use the “long URL” vs the shortcode; this is because it’s a “redirect” and so when embedding into a post via OEMBED (how WordPress does it), you actually have a redirect for video to load (!). This now shows up as error/to fix item for PageSpeed.

So, instead of using
http://youtu.be/cjB-2_H7y2Q
you would actually embed the long version in post as
https://www.youtube.com/watch?v=cjB-2_H7y2Q

seems stupid, I know. But, technically the browser has to go fetch that to load on your page, and it *is* a redirect from one place to another, which slows things down.

simchris
tagDiv Member

Checkout my new post, which condenses a lot of my suggestions from the oooooold sticky topic started a year ago in the Newspaper forum. 🙂

Might be some stuff there to help.

And, of course, be sure to CLEAR the mod_pagespeed cache once you change settings just to house clean. You don’t need to do that all the time, just good idea if you’re monkeying with bunches of other stuff.

I actually turn if OFF via htaccess

ModPagespeed off

when messing with ALL the other stuff, so it’s not trying to cache the other shenanigans.

Also remember that you need to hit the page a few times for PageSpeed to really optimize stuff.

salocharly
tagDiv Member

Thanks I will go over that, something interesting that happen for them record

I turned off BWM
I turned off Several options of speed buster
I turned off strings

all that in the newspaper theme, and activated speed booster with your code.

as a result I got 69/91. Witch really satisfy me.

did the same with newsmag (in my other site) and I get 63/83 witch is not bad but was doing better without mod_pagespeed.

I am getting a ton of error in the mobile version
Remove render-blocking JavaScript:
Optimize CSS Delivery
ptimize the following images to reduce their size by 115.2KiB (43% reduction).

also images are not optimized, is wird also becuase bith instalation are in the same vps…..

good news is that mobile is working now but grades are not so hot….

I tryed truning all off but is pretty much the same.

simchris
Participant
#0

For those who keep posting the same stuff over and over and don’t want to suffer the massive 14+ month old sticky thread on Pagespeed topics, I’ve chosen to condense many of MY own suggestions used daily with Newspaper and Newsmag into one new simpler post, which many may find useful for optimizing their site — some of this is also in the official theme docs, but some is not; some is for advanced users, some is special use case.

Rather than repost all of it here as duplicate post, I’ve put it all here:
https://forum.tagdiv.com/topic/tutorial-chriss-custom-optimizations-for-functions-php-etc/

PLEASE do not post questions in that thread! I won’t answer them.
Post any NEW questions about theme as new ticket.

Remember optimizing YOUR website is your job, not the the job of the theme, or the community of users. It’s up to YOU to learn how to manage your own site. When you buy a car, the dealer nor manufacturer teach you how to “drift” … same idea here. You’ve got the car, you need to learn to drive it. 🙂

simchris
tagDiv Member

When running PageSpeed testing if you keep running into the issue with external Gravatars loading from gravatar.com, copy the images from your website when loaded, and then upload to your media folder, or other folder.

Use this plugin:
https://wordpress.org/plugins/simple-local-avatars/

this will allow you to load all the author photos locally and *not* from gravatar.com, and it works with both the author box on posts, author page, and the author widget in sidebar.

simchris
tagDiv Member

For those using mod_pagespeed on Apache or other server type, here are my custom “works best with WordPress” settings which I add to my sites in the .htaccess file, at top, above the WordPress rewrite module stuff.

You generally do NOT want to use the javacript modification stuff with WordPress.
This is compatible with both Newspaper and Newsmag, and with TagDiv Speedbooster plugin.

<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_dns_prefetch
</IfModule>
  • This reply was modified 11 years by simchris.
simchris
Participant
#0

HI, folks
I thought I’d put this in ONE place (it’s buried in the pagespeed sticky topic on the newspaper forum, but a lot to shovel through there).

This is some of the custom code I put at bottom of my functions.php file EVERY time the theme is updated, and for ALL our websites, regardless of theme (with some new code for Visual Composer in this iteration).

Basically this code helps with various things – some of which are needlessly often done in plugins and don’t need to be – including things for PageSpeed rating, and general optimizations such as default image compression level for thumbnails, etc.

Use if you wish; but please *do not* go post this in a blog article as if it’s your idea or I’ll come and punch you 🙂

*NOTE:
this also includes code you might not need
a) remove visual composer CSS from post pages
b) remove pingback URL
c) change default WP thumb compression from 90 to 50 (some like 60)
d) remove yoast admin bar (annoying)
e) add go away message for people trying to login guessing passwords; great to use with limit login attempts
f) delete enclosure in RSS feed
g) disallow some things in comments for security

AND MY MAGIC BUNNY CODE:

/*CHRISTOPHER's CUSTOM MODS - 1.10.15 rev15A - (c) 2010-2015 Chris Simmons */

 remove_action( 'wp_head', 'wp_generator' ) ;
 remove_action( 'wp_head', 'wlwmanifest_link' ) ;
 remove_action( 'wp_head', 'rsd_link' ) ;
 remove_action( 'wp_head', 'feed_links', 2 );
 remove_action( 'wp_head', 'feed_links_extra', 3 );

 add_filter( 'pre_comment_content', 'wp_specialchars' );

 function no_errors_please(){
   return 'You appear to be up to no good. Please stop now!';
 }
 add_filter( 'login_errors', 'no_errors_please' );

 /* Disable YOAST SEO Admin Bar. */
 function mytheme_admin_bar_render() {
 	global $wp_admin_bar;
 	$wp_admin_bar->remove_menu('wpseo-menu');
 }
 // and we hook our function via
 add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

 function delete_enclosure(){
  return '';
  }
  add_filter( 'get_enclosed', 'delete_enclosure' );
  add_filter( 'rss_enclosure', 'delete_enclosure' );
  add_filter( 'atom_enclosure', 'delete_enclosure' );

 function remove_cssjs_ver( $src ) {
     if( strpos( $src, '?ver=' ) )
         $src = remove_query_arg( 'ver', $src );
     return $src;
 }
 add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
 add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

 add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );

 function remove_pingback_url( $output, $show ) {
     if ( $show == 'pingback_url' ) $output = '';
     return $output;
 }
 add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );

 add_action('init', 'myoverride', 100);
 function myoverride() {
     remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}

function dequeue_visual_composer_css() {
if (is_single()) {
    wp_dequeue_style('js_composer_front');
}
}
add_action('wp_enqueue_scripts', 'dequeue_visual_composer_css', 1003);

Note:
last item removes Visual Composer CSS from “post” pages (single). You would not use that if you use VC for anything on posts, obviously.

simchris
tagDiv Member

(the last item there removes visual composer css from post pages, where MOST folks don’t use VC; I don’t — remove that if you do)

See my other post on “mod_pagespeed” today for explanation of what some of that does. 🙂

simchris
tagDiv Member

Yeah.
I would turn off everything except mod_pagespeed since it does the minify of HTML on the fly, removes comments, etc.

Use the tagdiv speed booster plugin which moves and enqueues scripts at bottom of page.

Use the functions.php file to add the remove query string code.

Use W3 cache if you don’t have mod_pagspeed connected to APC/opcache/memcache on the server (which can be configured in the master mod_pagespeed config file). But use the settings recommended by TagDiv.

example of some of my custom stuff in functions.php to remove query strings, visual composer credit, etc.

*NOTE:
this also includes code you might not need
a) remove visual composer CSS from post pages
b) remove pingback URL
c) change default WP thumb compression from 90 to 50 (some like 60)
d) remove yoast admin bar (annoying)
e) add go away message for people trying to login guessing passwords; great to use with limit login attempts
f) delete enclosure in RSS feed
g) disallow some things in comments for security

——————

/*CHRISTOPHER's CUSTOM MODS - 1.10.15 rev15A (c) 2010-2015 */

remove_action( 'wp_head', 'wp_generator' ) ;
remove_action( 'wp_head', 'wlwmanifest_link' ) ;
remove_action( 'wp_head', 'rsd_link' ) ;
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );

add_filter( 'pre_comment_content', 'wp_specialchars' );

function no_errors_please(){
return 'You appear to be up to no good. Please stop now!';
}
add_filter( 'login_errors', 'no_errors_please' );

/* Disable YOAST SEO Admin Bar. */
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

function delete_enclosure(){
return '';
}
add_filter( 'get_enclosed', 'delete_enclosure' );
add_filter( 'rss_enclosure', 'delete_enclosure' );
add_filter( 'atom_enclosure', 'delete_enclosure' );

function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );

function remove_pingback_url( $output, $show ) {
if ( $show == 'pingback_url' ) $output = '';
return $output;
}
add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );

add_action('init', 'myoverride', 100);
function myoverride() {
remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}

function dequeue_visual_composer_css() {
if (is_single()) {
wp_dequeue_style('js_composer_front');
}
}
add_action('wp_enqueue_scripts', 'dequeue_visual_composer_css', 1003);

Note: my “lineup” cannot be posted in an article someplace, or stuff like that; use if you wish. I have left out some other things most folks don’t need, but we do. 🙂

Hope that helps 🙂

simchris
tagDiv Member

btw, here are the settings I use to explicitly specify what to use with WordPress based on experimenting with this last year at this time.

<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters move_css_to_head
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_dns_prefetch
</IfModule>

Your mileage may vary.

simchris
tagDiv Member

Doesn’t break my setup, here: (both running mod_pagespeed on our server)
ga-ga.com
floridanewswire.com

which device are you seeing the problem on?

Have you optimized your settings for mod_pagespeed specific to WordPress, such as adding the right items to your htaccess file?

salocharly
Participant
#0

Hi guys,
I installed mod_pagespeed today and it broke the mobile version of the site, it seems to screw up the css in the mobile version.

is this a known issue ?

any ideas or solutions welcome.

Thanks in advance!

Lucian
tagDiv Staff

Salut,

1. Playlist-ul functioneaza, l-am testat folosdine ultima versiune a temi si nu am gasit nici o problema. Daca ai folosit codul de playlist asa cum ai mentionat mai sus: PLZmJSg6GtjpdtY32aRfC06WebzQGxDVVG inseamna ca nu iti merge pentru ca nu ai adaugat corect codurile video-urilor, ele trebuie sa fie cu “virgula” intre ele, in felul urmator: PLZmJSg6Gtjpd, GtjpdtY32aRf, WebzQGxDVVG
Poti folosi si documentatia nostra pentru a afla cum se configureaza corect: https://forum.tagdiv.com/video-playlist/

3. Poti folosi urmatorul css pentru a face logo-ul sa arate bine pe mobile: http://screencast.com/t/RVcAR9FJ

@media (max-width: 767px){
.mobile-logo-wrap img {
top:0px!important;
}
}

4. Unele ID’uri pot lipsi din cauza ca script’urile sau stylesheet’urile lor au fost incarcate dupa ce functia a fost executata iar pentru a prevenii asta poti adauga functiei parametrul $priority pentru a fii executata mai tarziu: http://screencast.com/t/7fhfjttAT8
Poti citi mai multe aici: http://codex.wordpress.org/Function_Reference/add_action
Deasemenea poti gasi mai multe informatii despre cum sa iti imbunatatesti viteza site-ului urmarind acest tread: https://forum.tagdiv.com/topic/pagespeed/
Iti sugerez sa urmaresti si recomandarile celor de la google: https://developers.google.com/speed/docs/insights/BlockingJS ..pentru fiecare problema.

6. In ceea ce priveste forumurile e nevoie sa adaugi reclamele direct in sablonul(template-ul) pentru pagina de forum, categorii s.a.m.d
Pentru paginile de tag-uri sau categorii e nevoie sa editezi fisierul loop.php si sa adugi codoul pentru reclama, poti urmarii acest topic pentru asta: https://forum.tagdiv.com/topic/how-to-add-ads-in-category-pages/#post-21940

Multumesc!

Alex
tagDiv Member

Bună Alin,
Mulțumesc pentru răspuns!

  1. Am făcut schimbarea menționată în codul Wp Booster, dar problema persistă, la fel și după dezactivarea tuturor pluginurilor. Am activat pe pagina principală (http://itutorial.ro ) widgetul YouTube și poate fi văzut în sidebar. Menționez că folosesc următorul cod de playlist PLZmJSg6GtjpdtY32aRfC06WebzQGxDVVG
  2. Am reușit. Mulțumesc!
  3. Am încercat din nou și funcționează acum la logo Retina pentru desktop. La mobil nu știu la ce dimensiuni să încarc imaginile (nu este specificat în Theme Panel)… Problema este că pe mobil apare cam așa logoul (peste acea bordură albă): http://www.screencast.com/t/irtI1SBQa
  4. Cam asta am găsit în functions.php http://www.screencast.com/t/kmRI34jq și am targetat așa http://www.screencast.com/t/XmpSUSdB . În footer apare ceva de genul: http://www.screencast.com/t/Vs3rklgT0Lwz , iar pe Google PageSpeed: http://www.screencast.com/users/iTutorial.ro/folders/Default/media/a2213f66-cba7-4c17-8ef2-8db656616ae4
  5. Mulțumesc pentru răspuns
  6. Separat de întrebările adresate atunci, mai am una de care am uitat:

  7. Cum pot adăuga o reclamă suplimentară în forum (între subiecte, în pagina cu conversații, între răspunsuri, de exemplu)? De asemenea, se pot adăuga reclame în paginile cu taguri sau în categorii (în afara celor din sidebar/header/footer)?
  8. Mulțumesc!

Emil G
tagDiv Staff

Hi,

You shouldn’t add the last -css, just “jetpack_css”.
Try to optimize by enabling the default plugins, enable the rest one by one and look for the js/css classes.
The Pagespeed test also penalizes your score if you have too many plugins.

Thank you, Emil G.

Viewing 25 results - 2,251 through 2,275 (of 3,025 total)