Long loading time and some images sometime missing?

I just installed Cloudflare and I can see a few times some images were missing from my WordPress website. Then I measured speed load with Pingdom and it was over 22 sec! Before it was loading around 3 sec… and I thought it was slow… What can be an issue?

It could be many things, but without knowing the domain so we can check into it, it’s very difficult to diagnose.

Also, did you do anything with SSL settings?

MBZMaster.com . I got Flexible SSL which works fine. All my web pages show HTTPS now. Also Pingdom displays my webpage in a little window and clearly doesn’t have any images… just little squares. So it means images don’t load from another browser.
Also Pingdom shows: “Avoid bad requests” and lists all my images as bad requests. “references to the non-existent resources.” GTmetrix shows almost 18 seconds load… but displays images.

Initial page load was a bit slow. Are you using a caching plugin for your site? Those are quite helpful. I use WP Fastest Cache.

I ran a Pingdom test and it passed:

I’d also turn Rocket Loader off (Speed settings in Cloudflare). That may help speed things up as well.

All those third party resources from Google, Youtube, etc. add quite a bit of time at the end.

1 Like

Thank you for your reply. I actually played with it a little and everything start to work normally after I disabled Autoptimize plugin from my website. I guess minification from that plugin combined with minification from Cloudflare did some over-minify effect and some of my images stop loading. So right now website appears as it was before and not broken anymore.

However now I have a lot of .JS back and forth. Look below:

There are 11 JavaScript files served from mbzmaster.com. They should be combined into as few files as possible.

So load time increased a lot. That’s how it was when I had Autoptimize enabled:

There are 2 JavaScript files served from mbzmaster.com. They should be combined into as few files as possible.

So Autoptimize is doing much better job… but conflicts with Cloudflare :frowning:

Right now, your site’s configuration looks pretty good. There aren’t many resources within your domain, and they’re all loading within a one-second timeframe. All but the email-decode are cache HITs. That one is inserted by Cloudflare, so that’s presumably loaded from the Edge cache server anyhow. (at least I’d expect so)

One last tweak I would do would be to remove the Emojis component, since you’re probably not using it. You can add this to your theme’s functions.php file:

 * Disable the emojis
function disable_emojis() {
	remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
	remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
	remove_action( 'wp_print_styles', 'print_emoji_styles' );
	remove_action( 'admin_print_styles', 'print_emoji_styles' );	
	remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
	remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );	
	remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
	add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
add_action( 'init', 'disable_emojis' );

 * Filter function used to remove the tinymce emoji plugin.
 * @param    array  $plugins  
 * @return   array             Difference betwen the two arrays
function disable_emojis_tinymce( $plugins ) {
	if ( is_array( $plugins ) ) {
		return array_diff( $plugins, array( 'wpemoji' ) );
	} else {
		return array();

Ok, so here is what I did to resolve everything:

I completely uninstalled my 2 plugins: WP Super Cache and Autoptimize. Also cleared and deleted all backup folders from the server completely. Because it was setup to work with HTTP website and now I got HTTPS with free SSL Certificate from Cloudflare, so something was wrong with setup.

Then My website started to work normally, but even though I turned on cache and all 3 minified options + RocketLoader on Cloudflare - the performance was really terible: about 18 - 25 seconds loading time. It didn’t cache anything on my server and minifying was also terrible - over 12 .js files going back and forth. For some reason CF doesn’t minify a lot of files, especially with “min” in the name.

So then I turned off all the minification from CF and disabled RocketLoader. And I installed fresh version of WP Super Cache and Autoptimizer: both of them are doing much better job at caching and minifying.

So 2 things is a must: reinstall AO and WPSC after you move to SSL, and have to disable minification on CF, because it cannot minify together with AO. Also, like you suggested I disabled emoji, simply by check-marking box in AO settings, so there is no need to modify code.

Another thing I noticed is some Google Adsense ads: Matched Content, In-Article Ads, Anchor Ads and Vignette ads - is a CRIME to have! First of all it may take over 20 seconds to load!, although it loads asynchronously - it creates an empty space in between paragraphs, sticks ads to the mobile window which blocks some of your content and you need to click links multiple times until they actually work. Some ads are so intrusive into the content - that you can lose the point of an entire post. Most importantly -creates horrible end-user experience. So I disabled everything except Text and Display ads and in-feed ads.

So at the end my website load time went from 27 sec yesterday on Pingdom to 1.86 sec today and 93 score! Google page insights gave me also 93 on mobile, yesterday it was 13!


This topic was automatically closed after 14 days. New replies are no longer allowed.